Guest User

java code error

a guest
Feb 11th, 2018
129
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package TheEkhoedOne.UndisclosedModName.init;
  2.  
  3. import TheEkhoedOne.BetterCommandsMod.Reference;
  4. import TheEkhoedOne.BetterCommandsMod.items.ItemCheese;
  5.  
  6. import net.minecraft.client.Minecraft;
  7. import net.minecraft.client.renderer.block.model.ModelResourceLocation;
  8. import net.minecraft.item.Item;
  9. import net.minecraftforge.fml.common.registry.GameRegistry;
  10.  
  11. public class ModItems {
  12.    
  13.     public static Item cheese;
  14.    
  15.     public static void init() {
  16.         cheese = new ItemCheese();
  17.     }
  18.    
  19.     public static void register() {
  20.         GameRegistry.register(cheese);
  21.     }
  22.    
  23.     public static void registerRenders() {
  24.         registerRender(cheese);
  25.     }
  26.    
  27.     private static void registerRender(Item item) {
  28.         Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
  29.     }
  30. }
RAW Paste Data