Advertisement
CaptainSpaceCat

Tenebrium.java

May 7th, 2015
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.08 KB | None | 0 0
  1. package mod.divinity.init;
  2.  
  3. import mod.divinity.Reference;
  4. import mod.divinity.blocks.DivBlocks;
  5. import net.minecraft.block.Block;
  6. import net.minecraft.block.material.Material;
  7. import net.minecraft.client.Minecraft;
  8. import net.minecraft.client.resources.model.ModelResourceLocation;
  9. import net.minecraft.item.Item;
  10. import net.minecraftforge.fml.common.registry.GameRegistry;
  11.  
  12. public class DivinityBlocks {
  13.    
  14.     public static Block tenebrium_ore;
  15.    
  16.     public static void init() {
  17.         tenebrium_ore = new DivBlocks(Material.rock).setUnlocalizedName("tenebrium_ore");
  18.     }
  19.    
  20.     public static void register() {
  21.         GameRegistry.registerBlock(tenebrium_ore, tenebrium_ore.getUnlocalizedName().substring(5));
  22.     }
  23.    
  24.     public static void registerRenders() {
  25.         registerRender(tenebrium_ore);
  26.     }
  27.    
  28.     public static void registerRender(Block block) {
  29.         Item item = Item.getItemFromBlock(tenebrium_ore);
  30.         Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement