public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null)
{
$faces = [0 => 4, 1 => 2, 2 => 5, 3 => 3];
$this->meta = $faces[$player instanceof Player ? $player->getDirection() : 0];
$this->getLevel()->setBlock($block, $this, true, true);
$nbt = new CompoundTag("", [new ListTag("Items", []), new StringTag("id", Tile::FURNACE), new IntTag("x", $this->x), new IntTag("y", $this->y), new IntTag("z", $this->z)]);
$nbt->Items->setTagType(NBT::TAG_Compound);
if ($item->hasCustomName()) {
$nbt->CustomName = new StringTag("CustomName", $item->getCustomName());
}
if ($item->hasCustomBlockData()) {
foreach ($item->getCustomBlockData() as $key => $v) {
$nbt->{$key} = $v;
}
}
Tile::createTile("Furnace", $this->getLevel()->getChunk($this->x >> 4, $this->z >> 4), $nbt);
return true;
}