contract(0.025, 0, 0.025)->trim(Facing::UP, 0.05)]; } public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null) : bool{ if($player instanceof Player){ $enderChest = $this->position->getWorld()->getTile($this->position); if($enderChest instanceof TileEnderChest && $this->getSide(Facing::UP)->isTransparent()){ $enderChest->setViewerCount($enderChest->getViewerCount() + 1); $player->setCurrentWindow(new EnderChestInventory($this->position, $player->getEnderInventory())); } } return true; } public function getDropsForCompatibleTool(Item $item) : array{ return [ VanillaBlocks::OBSIDIAN()->asItem()->setCount(8) ]; } public function isAffectedBySilkTouch() : bool{ return true; } }