|null $tileClass */ public function __construct( private int $blockId, private int $variant, private ?int $itemId = null, private ?string $tileClass = null ){ if($tileClass !== null){ Utils::testValidInstance($tileClass, Tile::class); } } public function getBlockId() : int{ return $this->blockId; } /** * @return int[] */ public function getAllBlockIds() : array{ return [$this->blockId]; } public function getVariant() : int{ return $this->variant; } public function getItemId() : int{ return $this->itemId ?? ($this->blockId > 255 ? 255 - $this->blockId : $this->blockId); } /** * @phpstan-return class-string|null */ public function getTileClass() : ?string{ return $this->tileClass; } }