color) or !($nbt->color instanceof ByteTag)){ $nbt->color = new ByteTag("color", 14); //default to old red } parent::__construct($level, $nbt); } public function getColor() : int{ return $this->namedtag->color->getValue(); } public function setColor(int $color){ $this->namedtag->color->setValue($color & 0x0f); $this->onChanged(); } public function addAdditionalSpawnData(CompoundTag $nbt) : void{ $nbt->color = $this->namedtag->color; } protected static function createAdditionalNBT(CompoundTag $nbt, Vector3 $pos, ?int $face = null, ?Item $item = null, ?Player $player = null) : void{ $nbt->color = new ByteTag("color", $item !== null ? $item->getDamage() : 14); //default red } }