Guest User

Untitled

a guest
Sep 8th, 2015
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.69 KB | None | 0 0
  1. package rcpotatosoup.modsqaud.init;
  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.Item.ToolMaterial;
  7. import net.minecraft.item.ItemArmor.ArmorMaterial;
  8. import net.minecraftforge.common.util.EnumHelper;
  9. import net.minecraftforge.fml.common.registry.GameRegistry;
  10. import rcpotatosoup.modsqaud.ModSqaud;
  11. import rcpotatosoup.modsqaud.Reference;
  12. import rcpotatosoup.modsqaud.items.ItemModArmor;
  13. import rcpotatosoup.modsqaud.items.ItemModPickaxe;
  14. import rcpotatosoup.modsqaud.items.ItemModSword;
  15.  
  16. public class sitems {
  17.  
  18. public static Item chaos_gem;
  19. public static Item order_gem;
  20. public static Item chaos_core;
  21. public static Item order_core;
  22. public static Item chaos_fragment;
  23. public static Item order_fragment;
  24. public static Item magic_gem;
  25. public static Item enchanted_stick;
  26. public static Item feast;
  27. public static Item sword_of_order;
  28. public static Item sword_of_chaos;
  29. public static Item magic_wand;
  30. public static Item pickaxe_of_order;
  31. public static Item pickaxe_of_chaos;
  32. public static Item helmet_of_order;
  33. public static Item chestplate_of_order;
  34. public static Item leggings_of_order;
  35. public static Item boots_of_order;
  36. public static Item helmet_of_chaos;
  37. public static Item chestplate_of_chaos;
  38. public static Item leggings_of_chaos;
  39. public static Item boots_of_chaos;
  40. public static Item magic_hood;
  41. public static Item magic_cloak;
  42. public static Item magic_pants;
  43. public static Item magic_shoes;
  44.  
  45. public static ToolMaterial chaos = EnumHelper.addToolMaterial("chaos", 6, 6666, 15.0F, 66.0F, 30);
  46. public static ToolMaterial order = EnumHelper.addToolMaterial("order", 7, 7777, 15.0F, 77.0F, 60);
  47. public static ToolMaterial magic = EnumHelper.addToolMaterial("magic", 10, 10000, 25.0F, 120.0F, 50);
  48. private static String chaos2;
  49. public static ArmorMaterial chaos1 = EnumHelper.addArmorMaterial("chaos1", chaos2, 6666, new int[] {3, 8, 6, 3}, (int) 30.0F);
  50. private static String order2;
  51. public static ArmorMaterial order1 = EnumHelper.addArmorMaterial("order1", order2, 7777, new int[] {3, 8, 6, 3}, (int) 60.0F);
  52. private static String magic2;
  53. public static ArmorMaterial magic1 = EnumHelper.addArmorMaterial("magic1", magic2, 10000, new int[] {3, 8, 6, 3}, (int) 50.0F);
  54.  
  55. public static void init() {
  56. chaos_gem = new Item().setUnlocalizedName("chaos_gem").setCreativeTab(ModSqaud.tabModSqaud);
  57. order_gem = new Item().setUnlocalizedName("order_gem").setCreativeTab(ModSqaud.tabModSqaud);
  58. chaos_core = new Item().setUnlocalizedName("chaos_core").setCreativeTab(ModSqaud.tabModSqaud);
  59. order_core = new Item().setUnlocalizedName("order_core").setCreativeTab(ModSqaud.tabModSqaud);
  60. chaos_fragment = new Item().setUnlocalizedName("chaos_fragment").setCreativeTab(ModSqaud.tabModSqaud);
  61. order_fragment = new Item().setUnlocalizedName("order_fragment").setCreativeTab(ModSqaud.tabModSqaud);
  62. enchanted_stick = new Item().setUnlocalizedName("enchanted_stick").setCreativeTab(ModSqaud.tabModSqaud);
  63. feast = new Item().setUnlocalizedName("feast").setCreativeTab(ModSqaud.tabModSqaud);
  64. sword_of_chaos = new Item().setUnlocalizedName("sword_of_chaos").setCreativeTab(ModSqaud.tabModSqaud);
  65. sword_of_order = new Item().setUnlocalizedName("sword_of_order").setCreativeTab(ModSqaud.tabModSqaud);
  66. magic_wand = new Item().setUnlocalizedName("magic_wand").setCreativeTab(ModSqaud.tabModSqaud);
  67. pickaxe_of_order = new Item().setUnlocalizedName("pickaxe_of_order").setCreativeTab(ModSqaud.tabModSqaud);
  68. pickaxe_of_chaos = new Item().setUnlocalizedName("pickaxe_of_chaos").setCreativeTab(ModSqaud.tabModSqaud);
  69. helmet_of_order = new Item().setUnlocalizedName("helmet_of_order").setCreativeTab(ModSqaud.tabModSqaud);
  70. chestplate_of_order = new Item().setUnlocalizedName("chestplate_of_order").setCreativeTab(ModSqaud.tabModSqaud);
  71. leggings_of_order = new Item().setUnlocalizedName("leggings_of_order").setCreativeTab(ModSqaud.tabModSqaud);
  72. boots_of_order = new Item().setUnlocalizedName("boots_of_order").setCreativeTab(ModSqaud.tabModSqaud);
  73. helmet_of_chaos = new Item().setUnlocalizedName("helmet_of_chaos").setCreativeTab(ModSqaud.tabModSqaud);
  74. chestplate_of_chaos = new Item().setUnlocalizedName("chestplate_of_chaos").setCreativeTab(ModSqaud.tabModSqaud);
  75. leggings_of_chaos = new Item().setUnlocalizedName("leggings_of_chaos").setCreativeTab(ModSqaud.tabModSqaud);
  76. boots_of_chaos = new Item().setUnlocalizedName("boots_of_chaos").setCreativeTab(ModSqaud.tabModSqaud);
  77. magic_hood = new Item().setUnlocalizedName("magic_hood").setCreativeTab(ModSqaud.tabModSqaud);
  78. magic_cloak = new Item().setUnlocalizedName("magic_cloak").setCreativeTab(ModSqaud.tabModSqaud);
  79. magic_pants = new Item().setUnlocalizedName("magic_pants").setCreativeTab(ModSqaud.tabModSqaud);
  80. magic_shoes = new Item().setUnlocalizedName("magic_shoes").setCreativeTab(ModSqaud.tabModSqaud);
  81. }
  82.  
  83. public static void register()
  84. {
  85. GameRegistry.registerItem(chaos_gem, chaos_gem.getUnlocalizedName().substring(5), "chaos_gem").setCreativeTab(ModSqaud.tabModSqaud);
  86. GameRegistry.registerItem(order_gem, order_gem.getUnlocalizedName().substring(5), "order_gem").setCreativeTab(ModSqaud.tabModSqaud);
  87. GameRegistry.registerItem(magic_gem, magic_gem.getUnlocalizedName().substring(5), "magic_gem").setCreativeTab(ModSqaud.tabModSqaud);
  88. GameRegistry.registerItem(chaos_core, chaos_core.getUnlocalizedName().substring(5), "chaos_core").setCreativeTab(ModSqaud.tabModSqaud);
  89. GameRegistry.registerItem(order_core, order_core.getUnlocalizedName().substring(5), "order_core").setCreativeTab(ModSqaud.tabModSqaud);
  90. GameRegistry.registerItem(chaos_fragment, chaos_fragment.getUnlocalizedName().substring(5), "chaos_fragment").setCreativeTab(ModSqaud.tabModSqaud);
  91. GameRegistry.registerItem(order_fragment, order_fragment.getUnlocalizedName().substring(5), "order_fragment").setCreativeTab(ModSqaud.tabModSqaud);
  92. GameRegistry.registerItem(enchanted_stick, enchanted_stick.getUnlocalizedName().substring(5), "enchanted_stick").setCreativeTab(ModSqaud.tabModSqaud);
  93. GameRegistry.registerItem(feast, feast.getUnlocalizedName().substring(5), "feast").setCreativeTab(ModSqaud.tabModSqaud);
  94. GameRegistry.registerItem(sword_of_chaos = new ItemModSword("sword_of_chaos", chaos),sword_of_chaos.getUnlocalizedName().substring(5), "sword_of_chaos").setCreativeTab(ModSqaud.tabModSqaud);
  95. GameRegistry.registerItem(sword_of_order = new ItemModSword("sword_of_order", order),sword_of_order.getUnlocalizedName().substring(5), "sword_of_order").setCreativeTab(ModSqaud.tabModSqaud);
  96. GameRegistry.registerItem(magic_wand = new ItemModSword("magic_wand", magic),magic_wand.getUnlocalizedName().substring(5), "magic_wand").setCreativeTab(ModSqaud.tabModSqaud);
  97. GameRegistry.registerItem(pickaxe_of_chaos = new ItemModPickaxe("pickaxe_of_chaos", chaos), pickaxe_of_chaos.getUnlocalizedName().substring(5), "pickaxe_of_chaos").setCreativeTab(ModSqaud.tabModSqaud);
  98. GameRegistry.registerItem(pickaxe_of_order = new ItemModPickaxe("pickaxe_of_order", order), pickaxe_of_order.getUnlocalizedName().substring(5), "pickaxe_of_order").setCreativeTab(ModSqaud.tabModSqaud);
  99. GameRegistry.registerItem(helmet_of_order = new ItemModArmor("helmet_of_order", order1, 1, 0),helmet_of_order.getUnlocalizedName().substring(5), "helmet_of_order").setCreativeTab(ModSqaud.tabModSqaud);
  100. GameRegistry.registerItem(chestplate_of_order = new ItemModArmor("chestplate_of_order", order1, 1, 1),chestplate_of_order.getUnlocalizedName().substring(5), "chestplate_of_order").setCreativeTab(ModSqaud.tabModSqaud);
  101. GameRegistry.registerItem(leggings_of_order = new ItemModArmor("leggings_of_order", order1, 2, 2),leggings_of_order.getUnlocalizedName().substring(5), "leggings_of_order").setCreativeTab(ModSqaud.tabModSqaud);
  102. GameRegistry.registerItem(boots_of_order = new ItemModArmor("boots_of_order", order1, 1, 3),boots_of_order.getUnlocalizedName().substring(5), "boots_of_order").setCreativeTab(ModSqaud.tabModSqaud);
  103. GameRegistry.registerItem(helmet_of_chaos = new ItemModArmor("helmet_of_chaos", chaos1, 1, 0),helmet_of_chaos.getUnlocalizedName().substring(5), "helmet_of_chaos").setCreativeTab(ModSqaud.tabModSqaud);
  104. GameRegistry.registerItem(chestplate_of_chaos = new ItemModArmor("chestplate_of_chaos", chaos1, 1, 1),chestplate_of_chaos.getUnlocalizedName().substring(5), "chestplate_of_chaos").setCreativeTab(ModSqaud.tabModSqaud);
  105. GameRegistry.registerItem(leggings_of_chaos = new ItemModArmor("leggings_of_chaos", chaos1, 2, 2),leggings_of_chaos.getUnlocalizedName().substring(5), "leggings_of_chaos").setCreativeTab(ModSqaud.tabModSqaud);
  106. GameRegistry.registerItem(boots_of_chaos = new ItemModArmor("boots_of_chaos", chaos1, 1, 3),boots_of_chaos.getUnlocalizedName().substring(5), "boots_of_chaos").setCreativeTab(ModSqaud.tabModSqaud);
  107. GameRegistry.registerItem(magic_hood = new ItemModArmor("magic_hood", magic1, 1, 0),magic_hood.getUnlocalizedName().substring(5), "magic_hood").setCreativeTab(ModSqaud.tabModSqaud);
  108. GameRegistry.registerItem(magic_cloak = new ItemModArmor("magic_cloak", magic1, 1, 1),magic_cloak.getUnlocalizedName().substring(5), "magic_cloak").setCreativeTab(ModSqaud.tabModSqaud);
  109. GameRegistry.registerItem(magic_pants = new ItemModArmor("magic_pants", magic1, 2, 2),magic_pants.getUnlocalizedName().substring(5), "magic_pants").setCreativeTab(ModSqaud.tabModSqaud);
  110. GameRegistry.registerItem(magic_shoes = new ItemModArmor("magic_shoes", magic1, 1, 3),magic_shoes.getUnlocalizedName().substring(5), "magic_shoes").setCreativeTab(ModSqaud.tabModSqaud);
  111. }
  112.  
  113. public static void registerRenders()
  114. {
  115. registerRender(chaos_gem);
  116. registerRender(order_gem);
  117. registerRender(magic_gem);
  118. registerRender(chaos_core);
  119. registerRender(order_core);
  120. registerRender(chaos_fragment);
  121. registerRender(order_fragment);
  122. registerRender(enchanted_stick);
  123. registerRender(feast);
  124. registerRender(sword_of_order);
  125. registerRender(sword_of_chaos);
  126. registerRender(magic_wand);
  127. registerRender(pickaxe_of_order);
  128. registerRender(pickaxe_of_chaos);
  129. registerRender(helmet_of_order);
  130. registerRender(chestplate_of_order);
  131. registerRender(leggings_of_order);
  132. registerRender(boots_of_order);
  133. registerRender(helmet_of_chaos);
  134. registerRender(chestplate_of_chaos);
  135. registerRender(leggings_of_chaos);
  136. registerRender(boots_of_chaos);
  137. registerRender(magic_hood);
  138. registerRender(magic_cloak);
  139. registerRender(magic_pants);
  140. registerRender(magic_shoes);
  141. }
  142.  
  143. public static void registerRender(Item item)
  144. {
  145. Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
  146. }
  147. }
Advertisement
Add Comment
Please, Sign In to add comment