Advertisement
Guest User

Untitled

a guest
Jul 24th, 2015
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. package com.connor.pvpoverhaul;
  2.  
  3. import net.minecraft.client.Minecraft;
  4. import net.minecraft.client.resources.model.ModelResourceLocation;
  5. import net.minecraft.item.Item;
  6. import net.minecraft.item.ItemFood;
  7. import net.minecraftforge.fml.common.registry.GameRegistry;
  8.  
  9. public class ModItems {
  10.  
  11. public static Item gauze;
  12.  
  13. public static Item poisonSteak;
  14.  
  15. public static void init() {
  16. gauze = new Item().setUnlocalizedName("gauze");
  17. poisonSteak = new ItemFood(0, 0F, true).setUnlocalizedName("poisonSteak");
  18. }
  19.  
  20. public static void register()
  21. {
  22. GameRegistry.registerItem(gauze, gauze.getUnlocalizedName().substring(5));
  23. GameRegistry.registerItem(poisonSteak, poisonSteak.getUnlocalizedName().substring(5));
  24. }
  25.  
  26. public static void registerRenders()
  27. {
  28. registerRender(gauze);
  29. registerRender(poisonSteak);
  30. }
  31. public static void registerRender(Item item)
  32. {
  33. Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(gauze, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
  34. Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(poisonSteak, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
  35. }
  36.  
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement