public place ( |
||
$item | ||
$block | ||
$target | ||
$player |
public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null)
{
if ($player instanceof Player) {
$this->meta = ((int) $player->getDirection() + 5) % 4;
}
$this->getLevel()->setBlock($block, $this, true, false);
if ($this->checkPower($this)) {
$this->activate();
}
}