coralType = CoralType::TUBE(); parent::__construct($identifier, VanillaBlocks::CORAL_FAN()->getName()); } protected function describeType(RuntimeDataReader|RuntimeDataWriter $w) : void{ //this is aliased to ensure a compile error in case the functions in Item or Block start to differ in future //right now we can directly reuse encodeType from CoralTypeTrait, but that might silently stop working if Item //were to be altered. CoralTypeTrait was originally intended for blocks, so it's better not to assume anything. $this->encodeCoralType($w); } public function getBlock(?int $clickedFace = null) : Block{ $block = $clickedFace !== null && Facing::axis($clickedFace) !== Axis::Y ? VanillaBlocks::WALL_CORAL_FAN() : VanillaBlocks::CORAL_FAN(); return $block->setCoralType($this->coralType)->setDead($this->dead); } public function getFuelTime() : int{ return $this->getBlock()->getFuelTime(); } public function getMaxStackSize() : int{ return $this->getBlock()->getMaxStackSize(); } }