Advertisement
Guest User

Untitled

a guest
Dec 25th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1.     @EventHandler
  2.     public void onInit(FMLInitializationEvent event){
  3.         if(FMLCommonHandler.instance().getSide() == Side.CLIENT) {
  4.             Minecraft.getMinecraft().getItemColors().registerItemColorHandler((stack, tintIndex) -> {
  5.                 if (stack.hasTagCompound()) {
  6.                     NBTTagCompound nbtTagCompound = stack.getTagCompound();
  7.                     if (nbtTagCompound.hasKey("save")) {
  8.                         nbtTagCompound = nbtTagCompound.getCompoundTag("save");
  9.                         if (nbtTagCompound.hasKey("color")) {
  10.                             return nbtTagCompound.getInteger("color");
  11.                         }
  12.                     }
  13.                 }
  14.                 return 0x00FFFFFF;
  15.             }, cooler);
  16.         }
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement