Colored Armor

einsReplex

New Member
Hey little question, how do you get it
to dye your armor?


I would like if someone has the permissons
rights that he also get the cleaning with the respective color
 

Jaaan

Active Member
Hi,
I did it so:
Java:
   public Item setColor(Item item, int r, int g, int b) {
        int rgb = r << 16 | g << 8 | b << 0;
        CompoundTag tag = item.hasCompoundTag() ? item.getNamedTag() : new CompoundTag();
        tag.putInt("customColor", rgb);
        item.setNamedTag(tag);
        return item;
   }
 
Top