color; } public function setColor(int $color){ $this->color = $color & 0xf; $this->onChanged(); } protected function readSaveData(CompoundTag $nbt) : void{ $this->color = $nbt->getByte(self::TAG_COLOR, 14, true); } protected function writeSaveData(CompoundTag $nbt) : void{ $nbt->setByte(self::TAG_COLOR, $this->color); } protected function addAdditionalSpawnData(CompoundTag $nbt) : void{ $nbt->setByte(self::TAG_COLOR, $this->color); } protected static function createAdditionalNBT(CompoundTag $nbt, Vector3 $pos, ?int $face = null, ?Item $item = null, ?Player $player = null) : void{ if($item !== null){ $nbt->setByte(self::TAG_COLOR, $item->getDamage()); } } }