public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null)
{
$down = $this->getSide(0);
if ($down->isTransparent() === false) {
$faces = [0 => 3, 1 => 4, 2 => 2, 3 => 5];
$d = $player instanceof Player ? $player->getDirection() : 0;
$next = $this->getSide($faces[($d + 3) % 4]);
$downNext = $this->getSide(0);
if ($next->canBeReplaced() === true and $downNext->isTransparent() === false) {
$meta = ($d + 3) % 4 & 0x3;
$this->getLevel()->setBlock($block, Block::get($this->id, $meta), true, true);
$this->getLevel()->setBlock($next, Block::get($this->id, $meta | 0x8), true, true);
return true;
}
}
return false;
}