Guest User

toolsfile

a guest
Oct 25th, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.64 KB | None | 0 0
  1. package dem.tutorialmod.init;
  2.  
  3. import dem.tutorialmod.init.tools.BetterItemAxe;
  4. import dem.tutorialmod.init.tools.BetterItemPickaxe;
  5. import dem.tutorialmod.init.tools.BetterItemShovel;
  6. import dem.tutorialmod.main.Reference;
  7. import net.minecraft.client.Minecraft;
  8. import net.minecraft.client.renderer.block.model.ModelResourceLocation;
  9. import net.minecraft.item.Item;
  10. import net.minecraft.item.Item.ToolMaterial;
  11. import net.minecraftforge.fml.common.registry.GameRegistry;
  12.  
  13. public class BetterTools {
  14. public static Item PLATINUM_PICKAXE;
  15. public static Item DEMIUM_PICKAXE;
  16. public static Item OLLIUM_PICKAXE;
  17.  
  18. public static Item PLATINUM_AXE;
  19. public static Item DEMIUM_AXE;
  20. public static Item OLLIUM_AXE;
  21.  
  22. public static Item PLATINUM_SHOVEL;
  23. public static Item DEMIUM_SHOVEL;
  24. public static Item OLLIUM_SHOVEL;
  25.  
  26. public static Item DIAMOND_PAXEL;
  27. public static Item GOLD_PAXEL;
  28. public static Item STONE_PAXEL;
  29. public static Item WOOD_PAXEL;
  30. public static Item IRON_PAXEL;
  31.  
  32. public static Item PLATINUM_PAXEL;
  33. //public static Item OLLIUM_PAXEL;
  34. //public static Item DEMIUM_PAXEL;
  35.  
  36. public static void init()
  37. {
  38. //remember to change better item to the tool V
  39. PLATINUM_PICKAXE = new BetterItemPickaxe(BetterToolMaterials.PLATINUM, "platinum_pickaxe");
  40. PLATINUM_AXE = new BetterItemAxe(BetterToolMaterials.PLATINUM, "platinum_axe");
  41. PLATINUM_SHOVEL = new BetterItemShovel(BetterToolMaterials.PLATINUM, "platinum_shovel");
  42.  
  43. DEMIUM_PICKAXE = new BetterItemPickaxe(BetterToolMaterials.DEMIUM, "demium_pickaxe");
  44. DEMIUM_AXE = new BetterItemAxe(BetterToolMaterials.DEMIUM, "demium_axe");
  45. DEMIUM_SHOVEL = new BetterItemShovel(BetterToolMaterials.DEMIUM, "demium_shovel");
  46.  
  47. OLLIUM_PICKAXE = new BetterItemPickaxe(BetterToolMaterials.OLLIUM, "ollium_pickaxe");
  48. OLLIUM_AXE = new BetterItemAxe(BetterToolMaterials.OLLIUM, "ollium_axe");
  49. OLLIUM_SHOVEL = new BetterItemShovel(BetterToolMaterials.OLLIUM, "ollium_shovel");
  50.  
  51. DIAMOND_PAXEL = new TutorialItemPaxel(ToolMaterial.DIAMOND, "diamond_paxel");
  52. GOLD_PAXEL = new TutorialItemPaxel(ToolMaterial.GOLD, "gold_paxel");
  53. STONE_PAXEL = new TutorialItemPaxel(ToolMaterial.STONE, "stone_paxel");
  54. WOOD_PAXEL = new TutorialItemPaxel(ToolMaterial.WOOD, "wood_paxel");
  55. IRON_PAXEL = new TutorialItemPaxel(ToolMaterial.IRON, "iron_paxel"); //for loop
  56.  
  57.  
  58. PLATINUM_PAXEL = new TutorialItemPaxel(BetterToolMaterials.PLATINUM, "platinum_paxel");
  59.  
  60.  
  61. }
  62.  
  63.  
  64. public static void register()
  65. {
  66. registerItem(PLATINUM_PICKAXE);
  67. registerItem(PLATINUM_AXE);
  68. registerItem(PLATINUM_SHOVEL);
  69.  
  70. registerItem(DEMIUM_PICKAXE);
  71. registerItem(DEMIUM_AXE);
  72. registerItem(DEMIUM_SHOVEL);
  73.  
  74. registerItem(OLLIUM_PICKAXE);
  75. registerItem(OLLIUM_AXE);
  76. registerItem(OLLIUM_SHOVEL);
  77.  
  78. registerItem(DIAMOND_PAXEL);
  79. registerItem(GOLD_PAXEL);
  80. registerItem(STONE_PAXEL);
  81. registerItem(WOOD_PAXEL);
  82. registerItem(IRON_PAXEL);
  83.  
  84. registerItem(PLATINUM_PAXEL);
  85. //registerItem(OLLIUM_PAXEL);
  86. //registerItem(DEMIUM_PAXEL);
  87.  
  88. }
  89.  
  90. public static void registerItem(Item item)
  91. {
  92. GameRegistry.register(item);
  93.  
  94. Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
  95. }
  96.  
  97.  
  98. //registerItem Start\\
  99. /*public static Item registerItem (Item item, String name)
  100. {
  101. return registerItem(item, name, null);
  102. }
  103.  
  104. public static Item registerItem (Item item, String name, CreativeTabs tab)
  105. {
  106. GameRegistry.register(item, new ResourceLocation(Reference.MODID, name));
  107. return item;
  108. }*/
  109. //registerItem End\\
  110. }
Advertisement
Add Comment
Please, Sign In to add comment