holder = $holder; parent::__construct(27); } protected function getOpenSound() : Sound{ return new ShulkerBoxOpenSound(); } protected function getCloseSound() : Sound{ return new ShulkerBoxCloseSound(); } public function canAddItem(Item $item) : bool{ if($item->getId() === BlockLegacyIds::UNDYED_SHULKER_BOX || $item->getId() === BlockLegacyIds::SHULKER_BOX){ return false; } return parent::canAddItem($item); } protected function animateBlock(bool $isOpen) : void{ $holder = $this->getHolder(); //event ID is always 1 for a chest $holder->getWorld()->broadcastPacketToViewers($holder, BlockEventPacket::create(BlockPosition::fromVector3($holder), 1, $isOpen ? 1 : 0)); } }