getName()); $this->blockTypeId = $block->getTypeId(); $this->blockTypeData = $block->computeTypeData(); $this->fuelTime = $block->getFuelTime(); $this->fireProof = $block->isFireProofAsItem(); $this->maxStackSize = $block->getMaxStackSize(); } protected function describeType(RuntimeDataReader|RuntimeDataWriter $w) : void{ $w->int(Block::INTERNAL_STATE_DATA_BITS, $this->blockTypeData); } public function getBlock(?int $clickedFace = null) : Block{ //TODO: HACKY MESS, CLEAN IT UP $factory = BlockFactory::getInstance(); if(!$factory->isRegistered($this->blockTypeId)){ return VanillaBlocks::AIR(); } $blockType = $factory->fromTypeId($this->blockTypeId); $blockType->decodeTypeData($this->blockTypeData); return $blockType; } public function getFuelTime() : int{ return $this->fuelTime; } public function isFireProof() : bool{ return $this->fireProof; } public function getMaxStackSize() : int{ return $this->maxStackSize; } }