SHARE
TWEET

MineBoardBlocks.java

a guest May 11th, 2016 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.noxilus.mineboard.init;
  2.  
  3. import com.noxilus.mineboard.block.BlockCardboard;
  4. import com.noxilus.mineboard.client.Reference;
  5.  
  6. import net.minecraft.block.Block;
  7. import net.minecraft.block.material.Material;
  8. import net.minecraft.client.Minecraft;
  9. import net.minecraft.client.renderer.block.model.ModelResourceLocation;
  10. import net.minecraft.item.Item;
  11. import net.minecraftforge.fml.common.registry.GameRegistry;
  12.  
  13. public class MineBoardBlocks
  14. {
  15.     public static Block cardboard_block;
  16.    
  17.     public static void init()
  18.     {
  19.         cardboard_block = new BlockCardboard(Material.cloth);
  20.     }
  21.    
  22.     public static void register()
  23.     {
  24.         GameRegistry.register(cardboard_block.setRegistryName("cardboard_block"));
  25.     }
  26.    
  27.     public static void registerRenders()
  28.     {
  29.         registerRender(cardboard_block);
  30.     }
  31.    
  32.     public static void registerRender(Block block)
  33.     {
  34.         Item item = Item.getItemFromBlock(block);
  35.         Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
  36.     }
  37. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top