public function getColorCode()
{
return ($this->red << 16 | $this->green << 8 | $this->blue) & 0xffffff;
}
public function setCustomColor(Color $color) { if ($hasTag = $this->hasCompoundTag()) { $tag = $this->getNamedTag(); } else { $tag = new CompoundTag("", []); } $tag->customColor = new IntTag("customColor", $color->getColorCode()); $this->setCompoundTag($tag); }