Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.bleachcraft.Proxy;
- import net.bleachcraft.BleachCraft;
- import net.bleachcraft.Fluids.ClorineBlock;
- import net.minecraft.block.state.IBlockState;
- import net.minecraft.client.Minecraft;
- 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("bleachcraft" + ":" + 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;
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement