4, 1 => 2, 2 => 5, 3 => 3 ]; $this->meta = $faces[$player instanceof Player ? $player->getDirection() : 0]; $this->getLevel()->setBlock($blockReplace, $this, true, true); Tile::createTile(Tile::ENDER_CHEST, $this->getLevel(), TileEnderChest::createNBT($this, $face, $item, $player)); return true; } public function onBreak(Item $item, Player $player = null) : bool{ return Block::onBreak($item, $player); } public function onActivate(Item $item, Player $player = null) : bool{ if($player instanceof Player){ $t = $this->getLevel()->getTile($this); $enderChest = null; if($t instanceof TileEnderChest){ $enderChest = $t; }else{ $enderChest = Tile::createTile(Tile::ENDER_CHEST, $this->getLevel(), TileEnderChest::createNBT($this)); } if(!$this->getSide(Vector3::SIDE_UP)->isTransparent()){ return true; } $player->getEnderChestInventory()->setHolderPosition($enderChest); $player->addWindow($player->getEnderChestInventory()); } return true; } public function getDrops(Item $item) : array{ if($item->isPickaxe() >= Tool::TIER_WOODEN){ return [ItemFactory::get(Item::OBSIDIAN, 0, 8)]; } return []; } public function getFuelTime() : int{ return 0; } }