Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onInit(FMLInitializationEvent event){
- if(FMLCommonHandler.instance().getSide() == Side.CLIENT) {
- Minecraft.getMinecraft().getItemColors().registerItemColorHandler((stack, tintIndex) -> {
- if (stack.hasTagCompound()) {
- NBTTagCompound nbtTagCompound = stack.getTagCompound();
- if (nbtTagCompound.hasKey("save")) {
- nbtTagCompound = nbtTagCompound.getCompoundTag("save");
- if (nbtTagCompound.hasKey("color")) {
- return nbtTagCompound.getInteger("color");
- }
- }
- }
- return 0x00FFFFFF;
- }, cooler);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement