package net.BleachCraft; import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.ItemMeshDefinition; import net.minecraft.client.renderer.block.model.ModelBakery; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.block.statemap.StateMapperBase; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; public class ClientProxy extends CommonProxy { private static ModelResourceLocation gasLocation = new ModelResourceLocation(MODID.toLowerCase() + ":" + ClorineBlock.name, "gas"); @Override public void preInit(FMLPreInitializationEvent event) { super.preInit(event); Item gas = Item.getItemFromBlock(ClorineBlock.instance); ModelBakery.registerItemVariants(gas); ModelLoader.setCustomMeshDefinition(gas, new ItemMeshDefinition() { public ModelResourceLocation getModelLocation(ItemStack stack) { return gasLocation; } }); ModelLoader.setCustomStateMapper(ClorineBlock.instance, new StateMapperBase() { protected ModelResourceLocation getModelResourceLocation(IBlockState state) { return gasLocation; } }); } }