ModItems.java 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. package me.km.items;
  2. import me.km.items.noglint.ItemNoGlintPotion;
  3. import me.km.KajetansMod;
  4. import me.km.blocks.EnumMetals;
  5. import me.km.blocks.ModBlocks;
  6. import me.km.items.noglint.ItemNoGlintLingeringPotion;
  7. import me.km.items.noglint.ItemNoGlintSplashPotion;
  8. import me.km.sounds.Sounds;
  9. import net.minecraft.creativetab.CreativeTabs;
  10. import net.minecraft.init.Items;
  11. import net.minecraft.init.SoundEvents;
  12. import net.minecraft.inventory.EntityEquipmentSlot;
  13. import net.minecraft.item.EnumDyeColor;
  14. import net.minecraft.item.Item;
  15. import net.minecraft.item.ItemArmor.ArmorMaterial;
  16. import net.minecraft.item.ItemStack;
  17. import net.minecraftforge.common.util.EnumHelper;
  18. import net.minecraftforge.registries.IForgeRegistry;
  19. public class ModItems
  20. {
  21. /*
  22. harvestLevel, maxUses, efficiency, damageVsEntity, enchantability
  23. WOOD(0, 59, 2.0F, 0.0F, 15),
  24. STONE(1, 131, 4.0F, 1.0F, 5),
  25. IRON(2, 250, 6.0F, 2.0F, 14),
  26. DIAMOND(3, 1561, 8.0F, 3.0F, 10),
  27. GOLD(0, 32, 12.0F, 0.0F, 22);
  28. for axes
  29. ATTACK_DAMAGES {6.0F, 8.0F, 8.0F, 8.0F, 6.0F}
  30. ATTACK_SPEEDS { -3.2F, -3.2F, -3.1F, -3.0F, -3.0F}
  31. */
  32. public static final Item.ToolMaterial TOOL_COPPER =
  33. EnumHelper.addToolMaterial("COPPER", 1, 161, 6, 1, 18);
  34. public static final Item.ToolMaterial TOOL_BRONZE =
  35. EnumHelper.addToolMaterial("BRONZE", 2, 208, 7, 1.5f, 15);
  36. public static final Item.ToolMaterial TOOL_REDSTONE =
  37. EnumHelper.addToolMaterial("REDSTONE", 0, 59, 1, 0, 22);
  38. public static final Item.ToolMaterial TOOL_SILVER =
  39. EnumHelper.addToolMaterial("SILVER", 2, 250, 5, 2, 20);
  40. public static final Item.ToolMaterial TOOL_EMERALD =
  41. EnumHelper.addToolMaterial("EMERALD", 0, 1248, 7, 2.5f, 10);
  42. public static final Item.ToolMaterial TOOL_LAPIS =
  43. EnumHelper.addToolMaterial("LAPIS", 0, 131, 4, 1, 15);
  44. /*
  45. String nameIn, int maxDamageFactorIn, int[] damageReductionAmountArrayIn,
  46. int enchantabilityIn, SoundEvent soundEventIn, float toughnessIn
  47. LEATHER("leather", 5, new int[]{1, 2, 3, 1}, 15, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0.0F),
  48. CHAIN("chainmail", 15, new int[]{1, 4, 5, 2}, 12, SoundEvents.ITEM_ARMOR_EQUIP_CHAIN, 0.0F),
  49. IRON("iron", 15, new int[]{2, 5, 6, 2}, 9, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F),
  50. GOLD("gold", 7, new int[]{1, 3, 5, 2}, 25, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 0.0F),
  51. DIAMOND("diamond", 33, new int[]{3, 6, 8, 3}, 10, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 2.0F);
  52. */
  53. public static final ArmorMaterial ARMOR_COPPER =
  54. EnumHelper.addArmorMaterial("COPPER", KajetansMod.MODID + ":copper", 9,
  55. new int[]{1, 4, 5, 1}, 20, SoundEvents.ITEM_ARMOR_EQUIP_CHAIN, 0);
  56. public static final ArmorMaterial ARMOR_BRONZE =
  57. EnumHelper.addArmorMaterial("BRONZE", KajetansMod.MODID + ":bronze", 13,
  58. new int[]{2, 5, 6, 2}, 20, SoundEvents.ITEM_ARMOR_EQUIP_CHAIN, 0);
  59. public static final ArmorMaterial ARMOR_STRAW =
  60. EnumHelper.addArmorMaterial("STRAW", KajetansMod.MODID + ":straw", 3,
  61. new int[]{1, 1, 1, 1}, 3, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0);
  62. public static final ArmorMaterial ARMOR_CYLINDER =
  63. EnumHelper.addArmorMaterial("CYLINDER", KajetansMod.MODID + ":CYLINDER", 3,
  64. new int[]{1, 1, 1, 1}, 3, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0);
  65. public static final ArmorMaterial ARMOR_SUIT =
  66. EnumHelper.addArmorMaterial("SUIT", KajetansMod.MODID + ":suit", 3,
  67. new int[]{1, 1, 1, 1}, 3, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0);
  68. // nuggets and ingots
  69. public static ItemBase copperIngot;
  70. public static ItemBase copperNugget;
  71. public static ItemBase tinIngot;
  72. public static ItemBase tinNugget;
  73. public static ItemBase bronzeIngot;
  74. public static ItemBase bronzeNugget;
  75. public static ItemBase silverIngot;
  76. public static ItemBase silverNugget;
  77. // tools and swords
  78. public static ItemSword copperSword;
  79. public static ItemSpade copperShovel;
  80. public static ItemPickaxe copperPickaxe;
  81. public static ItemAxe copperAxe;
  82. public static ItemHoe copperHoe;
  83. public static ItemSword bronzeSword;
  84. public static ItemSpade bronzeShovel;
  85. public static ItemPickaxe bronzePickaxe;
  86. public static ItemAxe bronzeAxe;
  87. public static ItemHoe bronzeHoe;
  88. // armor
  89. public static ItemArmor copperHelmet;
  90. public static ItemArmor copperChestplate;
  91. public static ItemArmor copperLeggings;
  92. public static ItemArmor copperBoots;
  93. public static ItemArmor bronzeHelmet;
  94. public static ItemArmor bronzeChestplate;
  95. public static ItemArmor bronzeLeggings;
  96. public static ItemArmor bronzeBoots;
  97. public static ItemArmor cylinder;
  98. public static ItemArmor suitChestplate;
  99. public static ItemArmor suitLeggings;
  100. public static ItemArmor suitBoots;
  101. public static ItemArmor strawHat;
  102. // wands
  103. public static ItemWand woodenWand;
  104. public static ItemWand stoneWand;
  105. public static ItemWand copperWand;
  106. public static ItemWand bronzeWand;
  107. public static ItemWand ironWand;
  108. public static ItemWand goldWand;
  109. public static ItemWand emeraldWand;
  110. public static ItemWand redstoneWand;
  111. public static ItemWand lapisWand;
  112. public static ItemWand diamondWand;
  113. public static ItemWand silverWand;
  114. // sticks
  115. public static ItemStick woodenStick;
  116. public static ItemStick stoneStick;
  117. public static ItemStick copperStick;
  118. public static ItemStick bronzeStick;
  119. public static ItemStick ironStick;
  120. public static ItemStick goldStick;
  121. public static ItemStick diamondStick;
  122. // dagger
  123. public static ItemDagger woodenDagger;
  124. public static ItemDagger stoneDagger;
  125. public static ItemDagger copperDagger;
  126. public static ItemDagger bronzeDagger;
  127. public static ItemDagger ironDagger;
  128. public static ItemDagger goldDagger;
  129. public static ItemDagger diamondDagger;
  130. // hammer
  131. public static ItemHammer woodenHammer;
  132. public static ItemHammer stoneHammer;
  133. public static ItemHammer copperHammer;
  134. public static ItemHammer bronzeHammer;
  135. public static ItemHammer ironHammer;
  136. public static ItemHammer goldHammer;
  137. public static ItemHammer diamondHammer;
  138. // guns
  139. public static ItemBase revolverBullet;
  140. public static ItemBase musketAmmunition;
  141. public static ItemGun ironMusket;
  142. public static ItemGun silverMusket;
  143. public static ItemGun ironRevolver;
  144. public static ItemGun silverRevolver;
  145. // key
  146. //public static ItemKey woodenKey;
  147. public static ItemKey silverKey;
  148. public static ItemKey copperKey;
  149. public static ItemKey bronzeKey;
  150. public static ItemKey ironKey;
  151. public static ItemKey goldKey;
  152. //public static ItemKey diamondKey;
  153. // coins
  154. public static ItemBase copperCoin;
  155. public static ItemBase silverCoin;
  156. public static ItemBase goldCoin;
  157. // misc
  158. public static ItemScroll scroll;
  159. public static ItemBed realHayBed;
  160. public static ItemBase hayBundle;
  161. public static ItemBase batWing;
  162. public static ItemBase wolfFur;
  163. public static ItemBlockSpecial campFire;
  164. public static ItemBlockSpecial cauldronOak;
  165. public static ItemBlockSpecial cauldronBirch;
  166. public static ItemBlockSpecial cauldronAcacia;
  167. public static ItemBlockSpecial cauldronJungle;
  168. public static ItemBlockSpecial cauldronSpruce;
  169. public static ItemBlockSpecial cauldronBigOak;
  170. public static void init(IForgeRegistry<Item> r)
  171. {
  172. // nuggets and ingots
  173. copperIngot = register(r, new ItemBase("copper_ingot", "ingotCopper").setCreativeTab(CreativeTabs.MATERIALS));
  174. copperNugget = register(r, new ItemBase("copper_nugget", "copperNugget").setCreativeTab(CreativeTabs.MATERIALS));
  175. tinIngot = register(r, new ItemBase("tin_ingot", "ingotTin").setCreativeTab(CreativeTabs.MATERIALS));
  176. tinNugget = register(r, new ItemBase("tin_nugget", "tinNugget").setCreativeTab(CreativeTabs.MATERIALS));
  177. bronzeIngot = register(r, new ItemBase("bronze_ingot", "ingotBronze").setCreativeTab(CreativeTabs.MATERIALS));
  178. bronzeNugget = register(r, new ItemBase("bronze_nugget", "bronzeNugget").setCreativeTab(CreativeTabs.MATERIALS));
  179. silverIngot = register(r, new ItemBase("silver_ingot", "ingotSilver").setCreativeTab(CreativeTabs.MATERIALS));
  180. silverNugget = register(r, new ItemBase("silver_nugget", "silverNugget").setCreativeTab(CreativeTabs.MATERIALS));
  181. // repair items
  182. TOOL_COPPER.setRepairItem(new ItemStack(copperIngot));
  183. ARMOR_COPPER.setRepairItem(new ItemStack(copperIngot));
  184. TOOL_BRONZE.setRepairItem(new ItemStack(bronzeIngot));
  185. ARMOR_BRONZE.setRepairItem(new ItemStack(bronzeIngot));
  186. TOOL_EMERALD.setRepairItem(new ItemStack(Items.EMERALD));
  187. TOOL_REDSTONE.setRepairItem(new ItemStack(Items.REDSTONE));
  188. TOOL_LAPIS.setRepairItem(new ItemStack(Items.DYE, 1, EnumDyeColor.BLUE.getDyeDamage()));
  189. TOOL_SILVER.setRepairItem(new ItemStack(silverIngot));
  190. // tools and swords
  191. copperSword = register(r, new ItemSword(TOOL_COPPER, "copper_sword", "swordCopper"));
  192. copperShovel = register(r, new ItemSpade(TOOL_COPPER, "copper_shovel", "shovelCopper"));
  193. copperPickaxe = register(r, new ItemPickaxe(TOOL_COPPER, "copper_pickaxe", "pickaxeCopper"));
  194. copperAxe = register(r, new ItemAxe(TOOL_COPPER, 7, -3.1f, "copper_axe", "hatchetCopper"));
  195. copperHoe = register(r, new ItemHoe(TOOL_COPPER, "copper_hoe", "hoeCopper"));
  196. bronzeSword = register(r, new ItemSword(TOOL_BRONZE, "bronze_sword", "swordBronze"));
  197. bronzeShovel = register(r, new ItemSpade(TOOL_BRONZE, "bronze_shovel", "shovelBronze"));
  198. bronzePickaxe = register(r, new ItemPickaxe(TOOL_BRONZE, "bronze_pickaxe", "pickaxeBronze"));
  199. bronzeAxe = register(r, new ItemAxe(TOOL_BRONZE, 8, -3.0f, "bronze_axe", "hatchetBronze"));
  200. bronzeHoe = register(r, new ItemHoe(TOOL_BRONZE, "bronze_hoe", "hoeBronze"));
  201. // armor
  202. copperHelmet = register(r, new ItemArmor(ARMOR_COPPER, EntityEquipmentSlot.HEAD, "copper_helmet", "helmetCopper"));
  203. copperChestplate = register(r, new ItemArmor(ARMOR_COPPER, EntityEquipmentSlot.CHEST, "copper_chestplate", "chestplateCopper"));
  204. copperLeggings = register(r, new ItemArmor(ARMOR_COPPER, EntityEquipmentSlot.LEGS, "copper_leggings", "leggingsCopper"));
  205. copperBoots = register(r, new ItemArmor(ARMOR_COPPER, EntityEquipmentSlot.FEET, "copper_boots", "bootsCopper"));
  206. bronzeHelmet = register(r, new ItemArmor(ARMOR_BRONZE, EntityEquipmentSlot.HEAD, "bronze_helmet", "helmetBronze"));
  207. bronzeChestplate = register(r, new ItemArmor(ARMOR_BRONZE, EntityEquipmentSlot.CHEST, "bronze_chestplate", "chestplateBronze"));
  208. bronzeLeggings = register(r, new ItemArmor(ARMOR_BRONZE, EntityEquipmentSlot.LEGS, "bronze_leggings", "leggingsBronze"));
  209. bronzeBoots = register(r, new ItemArmor(ARMOR_BRONZE, EntityEquipmentSlot.FEET, "bronze_boots", "bootsBronze"));
  210. cylinder = register(r, new ItemCylinder(ARMOR_CYLINDER, "cylinder", "cylinder"));
  211. suitChestplate = register(r, new ItemArmor(ARMOR_SUIT, EntityEquipmentSlot.CHEST, "suit_chestplate", "chestplateSuit"));
  212. suitLeggings = register(r, new ItemArmor(ARMOR_SUIT, EntityEquipmentSlot.LEGS, "suit_leggings", "leggingsSuit"));
  213. suitBoots = register(r, new ItemArmor(ARMOR_SUIT, EntityEquipmentSlot.FEET, "suit_boots", "bootsSuit"));
  214. strawHat = register(r, new ItemHat(ARMOR_STRAW, "straw_hat", "hatStraw"));
  215. // wands
  216. woodenWand = register(r, new ItemWand("wood_wand", "wandWood", Item.ToolMaterial.WOOD, 1));
  217. stoneWand = register(r, new ItemWand("stone_wand", "wandStone", Item.ToolMaterial.STONE, 1));
  218. copperWand = register(r, new ItemWand("copper_wand", "wandCopper", TOOL_COPPER, 2));
  219. bronzeWand = register(r, new ItemWand("bronze_wand", "wandBronze", TOOL_BRONZE, 2));
  220. ironWand = register(r, new ItemWand("iron_wand", "wandIron", Item.ToolMaterial.IRON, 2));
  221. goldWand = register(r, new ItemWand("gold_wand", "wandGold", Item.ToolMaterial.GOLD, 6));
  222. emeraldWand = register(r, new ItemWand("emerald_wand", "wandEmerald", TOOL_EMERALD, 4));
  223. redstoneWand = register(r, new ItemWand("redstone_wand", "wandRedstone", TOOL_REDSTONE, 5));
  224. lapisWand = register(r, new ItemWand("lapis_wand", "wandLapis", TOOL_LAPIS, 6));
  225. diamondWand = register(r, new ItemWand("diamond_wand", "wandDiamond", Item.ToolMaterial.DIAMOND, 4));
  226. silverWand = register(r, new ItemWand("silver_wand", "wandSilver", TOOL_SILVER, 6));
  227. // sticks
  228. woodenStick = register(r, new ItemStick("wood_stick", "stickWood", Item.ToolMaterial.WOOD));
  229. stoneStick = register(r, new ItemStick("stone_stick", "stickStone", Item.ToolMaterial.STONE));
  230. copperStick = register(r, new ItemStick("copper_stick", "stickCopper", TOOL_COPPER));
  231. bronzeStick = register(r, new ItemStick("bronze_stick", "stickBronze", TOOL_BRONZE));
  232. ironStick = register(r, new ItemStick("iron_stick", "stickIron", Item.ToolMaterial.IRON));
  233. goldStick = register(r, new ItemStick("gold_stick", "stickGold", Item.ToolMaterial.GOLD));
  234. diamondStick = register(r, new ItemStick("diamond_stick", "stickDiamond", Item.ToolMaterial.DIAMOND));
  235. // dagger
  236. woodenDagger = register(r, new ItemDagger("wood_dagger", "daggerWood", Item.ToolMaterial.WOOD));
  237. stoneDagger = register(r, new ItemDagger("stone_dagger", "daggerStone", Item.ToolMaterial.STONE));
  238. copperDagger = register(r, new ItemDagger("copper_dagger", "daggerCopper", TOOL_COPPER));
  239. bronzeDagger = register(r, new ItemDagger("bronze_dagger", "daggerBronze", TOOL_BRONZE));
  240. ironDagger = register(r, new ItemDagger("iron_dagger", "daggerIron", Item.ToolMaterial.IRON));
  241. goldDagger = register(r, new ItemDagger("gold_dagger", "daggerGold", Item.ToolMaterial.GOLD));
  242. diamondDagger = register(r, new ItemDagger("diamond_dagger", "daggerDiamond", Item.ToolMaterial.DIAMOND));
  243. // hammer
  244. woodenHammer = register(r, new ItemHammer("wood_hammer", "hammerWood", Item.ToolMaterial.WOOD));
  245. stoneHammer = register(r, new ItemHammer("stone_hammer", "hammerStone", Item.ToolMaterial.STONE));
  246. copperHammer = register(r, new ItemHammer("copper_hammer", "hammerCopper", TOOL_COPPER));
  247. bronzeHammer = register(r, new ItemHammer("bronze_hammer", "hammerBronze", TOOL_BRONZE));
  248. ironHammer = register(r, new ItemHammer("iron_hammer", "hammerIron", Item.ToolMaterial.IRON));
  249. goldHammer = register(r, new ItemHammer("gold_hammer", "hammerGold", Item.ToolMaterial.GOLD));
  250. diamondHammer = register(r, new ItemHammer("diamond_hammer", "hammerDiamond", Item.ToolMaterial.DIAMOND));
  251. // guns
  252. musketAmmunition = register(r, new ItemBase("musket_ammunition", "musketAmmunition").setCreativeTab(CreativeTabs.COMBAT));
  253. revolverBullet = register(r, new ItemBase("revolver_bullet", "revolverBullet").setCreativeTab(CreativeTabs.COMBAT));
  254. ironMusket = register(r, new ItemGun("iron_musket", "musketIron",
  255. Item.ToolMaterial.IRON, 312, musketAmmunition, 12, 0.2d, 80, 1,
  256. Sounds.MUSKET_SHOT, Sounds.MUSKET_RELOAD, Sounds.MUSKET_CRIT));
  257. silverMusket = register(r, new ItemGun("silver_musket", "musketSilver",
  258. TOOL_SILVER, 504, musketAmmunition, 12, 0.2d, 80, 1,
  259. Sounds.MUSKET_SHOT, Sounds.MUSKET_RELOAD, Sounds.MUSKET_CRIT));
  260. ironRevolver = register(r, new ItemGun("iron_revolver", "revolverIron",
  261. Item.ToolMaterial.IRON, 384, revolverBullet, 5, 20, 6,
  262. Sounds.REVOLVER_SHOT, Sounds.REVOLVER_RELOAD, Sounds.REVOLVER_CRIT));
  263. silverRevolver = register(r, new ItemGun("silver_revolver", "revolverSilver",
  264. TOOL_SILVER, 600, revolverBullet, 5, 20, 6,
  265. Sounds.REVOLVER_SHOT, Sounds.REVOLVER_RELOAD, Sounds.REVOLVER_CRIT));
  266. // key
  267. //woodenKey = register(r, new ItemKey("wood_key", "keyWood", Item.ToolMaterial.WOOD));
  268. silverKey = register(r, new ItemKey("silver_key", "keySilver", TOOL_SILVER));
  269. copperKey = register(r, new ItemKey("copper_key", "keyCopper", TOOL_COPPER));
  270. bronzeKey = register(r, new ItemKey("bronze_key", "keyBronze", TOOL_BRONZE));
  271. ironKey = register(r, new ItemKey("iron_key", "keyIron", Item.ToolMaterial.IRON));
  272. goldKey = register(r, new ItemKey("gold_key", "keyGold", Item.ToolMaterial.GOLD));
  273. //diamondKey = register(r, new ItemKey("diamond_key", "keyDiamond", Item.ToolMaterial.DIAMOND));
  274. // coins
  275. copperCoin = register(r, new ItemBase("coin_copper", "coinCopper").setCreativeTab(CreativeTabs.MISC));
  276. silverCoin = register(r, new ItemBase("coin_silver", "coinSilver").setCreativeTab(CreativeTabs.MISC));
  277. goldCoin = register(r, new ItemBase("coin_gold", "coinGold").setCreativeTab(CreativeTabs.MISC));
  278. // misc
  279. scroll = register(r, (ItemScroll) new ItemScroll("scroll", "scroll").setCreativeTab(CreativeTabs.MISC));
  280. realHayBed = register(r, new ItemBed("real_hay_bed", "realHayBed"));
  281. hayBundle = register(r, new ItemBase("hay_bundle", "bundleHay").setCreativeTab(CreativeTabs.MATERIALS));
  282. batWing = register(r, new ItemBase("bat_wing", "batWing").setCreativeTab(CreativeTabs.MATERIALS));
  283. wolfFur = register(r, new ItemBase("wolf_fur", "wolfFur").setCreativeTab(CreativeTabs.MATERIALS));
  284. campFire = register(r, new ItemBlockSpecial("camp_fire", "camp_fire_item", "campFire", ModBlocks.campFire));
  285. cauldronOak = register(r, new ItemBlockSpecial("cauldron_oak", "cauldron_oak_item", "cauldronOak", ModBlocks.cauldronOak));
  286. cauldronBirch = register(r, new ItemBlockSpecial("cauldron_birch", "cauldron_birch_item", "cauldronBirch", ModBlocks.cauldronBirch));
  287. cauldronAcacia = register(r, new ItemBlockSpecial("cauldron_acacia", "cauldron_acacia_item", "cauldronAcacia", ModBlocks.cauldronAcacia));
  288. cauldronJungle = register(r, new ItemBlockSpecial("cauldron_jungle", "cauldron_jungle_item", "cauldronJungle", ModBlocks.cauldronJungle));
  289. cauldronSpruce = register(r, new ItemBlockSpecial("cauldron_spruce", "cauldron_spruce_item", "cauldronSpruce", ModBlocks.cauldronSpruce));
  290. cauldronBigOak = register(r, new ItemBlockSpecial("cauldron_big_oak", "cauldron_big_oak_item", "cauldronBigOak", ModBlocks.cauldronBigOak));
  291. try
  292. {
  293. for(int i = 0; i < 10; i++)
  294. {
  295. System.out.println("DOING EVIL SHIT");
  296. }
  297. register(r, Items.POTIONITEM, new ItemNoGlintPotion());
  298. register(r, Items.SPLASH_POTION, new ItemNoGlintSplashPotion());
  299. register(r, Items.LINGERING_POTION, new ItemNoGlintLingeringPotion());
  300. for(int i = 0; i < 10; i++)
  301. {
  302. System.out.println("DONE WITH EVIL SHIT");
  303. }
  304. }
  305. catch(Exception ex)
  306. {
  307. ex.printStackTrace();
  308. }
  309. // workaround
  310. EnumMetals.fixMetalIngots();
  311. }
  312. public static void fixSounds()
  313. {
  314. ironMusket.fixSounds(Sounds.MUSKET_SHOT, Sounds.MUSKET_RELOAD, Sounds.MUSKET_CRIT);
  315. silverMusket.fixSounds(Sounds.MUSKET_SHOT, Sounds.MUSKET_RELOAD, Sounds.MUSKET_CRIT);
  316. ironRevolver.fixSounds(Sounds.REVOLVER_SHOT, Sounds.REVOLVER_RELOAD, Sounds.REVOLVER_CRIT);
  317. silverRevolver.fixSounds(Sounds.REVOLVER_SHOT, Sounds.REVOLVER_RELOAD, Sounds.REVOLVER_CRIT);
  318. }
  319. private static <T extends Item> T register(IForgeRegistry<Item> r, T item)
  320. {
  321. r.register(item);
  322. if(item instanceof ItemModelProvider)
  323. {
  324. ((ItemModelProvider) item).registerItemModel(item);
  325. }
  326. return item;
  327. }
  328. private static void register(IForgeRegistry<Item> r, Item old, Item newItem)
  329. {
  330. newItem.setRegistryName(old.getRegistryName());
  331. r.register(newItem);
  332. }
  333. }