public function setCompoundTag($tags) { if ($tags instanceof CompoundTag) { $this->setNamedTag($tags); } else { $this->tags = $tags; $this->cachedNBT = null; } return $this; }
public static function clearCustomColorToArmor(Item $item) { if (!$item->hasCompoundTag()) { return; } $tag = $item->getNamedTag(); if (isset($tag->customColor)) { unset($tag->customColor); } $item->setCompoundTag($tag); // }