net.minecraft.client.renderer.color.IItemColor Java Examples
The following examples show how to use
net.minecraft.client.renderer.color.IItemColor.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClientProxy.java From Cyberware with MIT License | 6 votes |
@Override public void init() { super.init(); KeyBinds.init(); MinecraftForge.EVENT_BUS.register(EssentialsMissingHandlerClient.INSTANCE); MinecraftForge.EVENT_BUS.register(CreativeMenuHandler.INSTANCE); MinecraftForge.EVENT_BUS.register(CyberwareMenuHandler.INSTANCE); MinecraftForge.EVENT_BUS.register(HudHandler.INSTANCE); ShaderUtil.init(); if (CyberwareConfig.CLOTHES) { Minecraft.getMinecraft().getItemColors().registerItemColorHandler(new IItemColor() { public int getColorFromItemstack(ItemStack stack, int tintIndex) { return tintIndex > 0 ? -1 : ((ItemArmorCyberware)stack.getItem()).getColor(stack); } }, new Item[] { CyberwareContent.trenchcoat }); } }
Example #2
Source File: ClientProxy.java From AdvancedRocketry with MIT License | 6 votes |
@Override public void init() { //Colorizers CrystalColorizer colorizer = new CrystalColorizer(); Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler((IBlockColor)colorizer, new Block[] {AdvancedRocketryBlocks.blockCrystal}); Minecraft.getMinecraft().getItemColors().registerItemColorHandler((IItemColor)colorizer, Item.getItemFromBlock(AdvancedRocketryBlocks.blockCrystal)); Minecraft.getMinecraft().getItemColors().registerItemColorHandler(new IItemColor() { public int getColorFromItemstack(ItemStack stack, int tintIndex) { return tintIndex > 0 ? -1 : ((ItemArmor)stack.getItem()).getColor(stack); } }, AdvancedRocketryItems.itemSpaceSuit_Boots, AdvancedRocketryItems.itemSpaceSuit_Chest, AdvancedRocketryItems.itemSpaceSuit_Helmet, AdvancedRocketryItems.itemSpaceSuit_Leggings); AdvancedRocketry.materialRegistry.init(); }