ModItems.java 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  1. package me.km.items;
  2. import me.km.items.weapons.ItemWand;
  3. import me.km.items.weapons.ItemSword;
  4. import me.km.items.weapons.ItemStick;
  5. import me.km.items.tools.ItemSpade;
  6. import me.km.items.tools.ItemPickaxe;
  7. import me.km.items.tools.ItemHoe;
  8. import me.km.items.tools.ItemHammer;
  9. import me.km.items.tools.ItemAxe;
  10. import me.km.items.weapons.ItemGun;
  11. import me.km.items.weapons.ItemDagger;
  12. import me.km.items.herbs.ItemHerbs;
  13. import me.km.items.noglint.ItemNoGlintPotion;
  14. import me.km.KajetansMod;
  15. import me.km.blocks.EnumMetals;
  16. import me.km.blocks.ModBlocks;
  17. import me.km.items.herbs.ItemAquaHerb;
  18. import me.km.items.herbs.ItemGoldHerb;
  19. import me.km.items.noglint.ItemNoGlintLingeringPotion;
  20. import me.km.items.noglint.ItemNoGlintSplashPotion;
  21. import me.km.items.weapons.ItemBattleAxe;
  22. import me.km.items.weapons.ItemGreatSword;
  23. import me.km.items.weapons.ItemSpear;
  24. import me.km.sounds.Sounds;
  25. import net.minecraft.creativetab.CreativeTabs;
  26. import net.minecraft.init.Items;
  27. import net.minecraft.init.MobEffects;
  28. import net.minecraft.init.SoundEvents;
  29. import net.minecraft.inventory.EntityEquipmentSlot;
  30. import net.minecraft.item.EnumDyeColor;
  31. import net.minecraft.item.Item;
  32. import net.minecraft.item.ItemArmor.ArmorMaterial;
  33. import net.minecraft.item.ItemStack;
  34. import net.minecraft.potion.PotionEffect;
  35. import net.minecraftforge.common.util.EnumHelper;
  36. import net.minecraftforge.registries.IForgeRegistry;
  37. public class ModItems
  38. {
  39. /*
  40. harvestLevel, maxUses, efficiency, damageVsEntity, enchantability
  41. WOOD(0, 59, 2.0F, 0.0F, 15),
  42. STONE(1, 131, 4.0F, 1.0F, 5),
  43. IRON(2, 250, 6.0F, 2.0F, 14),
  44. DIAMOND(3, 1561, 8.0F, 3.0F, 10),
  45. GOLD(0, 32, 12.0F, 0.0F, 22);
  46. for axes
  47. ATTACK_DAMAGES {6.0F, 8.0F, 8.0F, 8.0F, 6.0F}
  48. ATTACK_SPEEDS { -3.2F, -3.2F, -3.1F, -3.0F, -3.0F}
  49. */
  50. public static final Item.ToolMaterial TOOL_COPPER =
  51. EnumHelper.addToolMaterial("COPPER", 1, 161, 6, 1, 18);
  52. public static final Item.ToolMaterial TOOL_BRONZE =
  53. EnumHelper.addToolMaterial("BRONZE", 2, 208, 7, 1.5f, 15);
  54. public static final Item.ToolMaterial TOOL_REDSTONE =
  55. EnumHelper.addToolMaterial("REDSTONE", 0, 59, 1, 0, 22);
  56. public static final Item.ToolMaterial TOOL_SILVER =
  57. EnumHelper.addToolMaterial("SILVER", 2, 250, 5, 2, 20);
  58. public static final Item.ToolMaterial TOOL_EMERALD =
  59. EnumHelper.addToolMaterial("EMERALD", 0, 1248, 7, 2.5f, 10);
  60. public static final Item.ToolMaterial TOOL_LAPIS =
  61. EnumHelper.addToolMaterial("LAPIS", 0, 131, 4, 1, 15);
  62. /*
  63. String nameIn, int maxDamageFactorIn, int[] damageReductionAmountArrayIn,
  64. int enchantabilityIn, SoundEvent soundEventIn, float toughnessIn
  65. LEATHER("leather", 5, new int[]{1, 2, 3, 1}, 15, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0.0F),
  66. CHAIN("chainmail", 15, new int[]{1, 4, 5, 2}, 12, SoundEvents.ITEM_ARMOR_EQUIP_CHAIN, 0.0F),
  67. IRON("iron", 15, new int[]{2, 5, 6, 2}, 9, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F),
  68. GOLD("gold", 7, new int[]{1, 3, 5, 2}, 25, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 0.0F),
  69. DIAMOND("diamond", 33, new int[]{3, 6, 8, 3}, 10, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 2.0F);
  70. */
  71. public static final ArmorMaterial ARMOR_COPPER =
  72. EnumHelper.addArmorMaterial("COPPER", KajetansMod.MODID + ":copper", 9,
  73. new int[]{1, 4, 5, 1}, 20, SoundEvents.ITEM_ARMOR_EQUIP_CHAIN, 0);
  74. public static final ArmorMaterial ARMOR_BRONZE =
  75. EnumHelper.addArmorMaterial("BRONZE", KajetansMod.MODID + ":bronze", 13,
  76. new int[]{2, 5, 6, 2}, 20, SoundEvents.ITEM_ARMOR_EQUIP_CHAIN, 0);
  77. public static final ArmorMaterial ARMOR_STRAW =
  78. EnumHelper.addArmorMaterial("STRAW", KajetansMod.MODID + ":straw", 3,
  79. new int[]{1, 1, 1, 1}, 3, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0);
  80. public static final ArmorMaterial ARMOR_CYLINDER =
  81. EnumHelper.addArmorMaterial("CYLINDER", KajetansMod.MODID + ":CYLINDER", 3,
  82. new int[]{1, 1, 1, 1}, 3, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0);
  83. public static final ArmorMaterial ARMOR_SUIT =
  84. EnumHelper.addArmorMaterial("SUIT", KajetansMod.MODID + ":suit", 3,
  85. new int[]{1, 1, 1, 1}, 3, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0);
  86. // nuggets and ingots
  87. public static ItemBase copperIngot;
  88. public static ItemBase copperNugget;
  89. public static ItemBase tinIngot;
  90. public static ItemBase tinNugget;
  91. public static ItemBase bronzeIngot;
  92. public static ItemBase bronzeNugget;
  93. public static ItemBase silverIngot;
  94. public static ItemBase silverNugget;
  95. // tools and swords
  96. public static ItemSword copperSword;
  97. public static ItemSpade copperShovel;
  98. public static ItemPickaxe copperPickaxe;
  99. public static ItemAxe copperAxe;
  100. public static ItemHoe copperHoe;
  101. public static ItemSword bronzeSword;
  102. public static ItemSpade bronzeShovel;
  103. public static ItemPickaxe bronzePickaxe;
  104. public static ItemAxe bronzeAxe;
  105. public static ItemHoe bronzeHoe;
  106. // armor
  107. public static ItemArmor copperHelmet;
  108. public static ItemArmor copperChestplate;
  109. public static ItemArmor copperLeggings;
  110. public static ItemArmor copperBoots;
  111. public static ItemArmor bronzeHelmet;
  112. public static ItemArmor bronzeChestplate;
  113. public static ItemArmor bronzeLeggings;
  114. public static ItemArmor bronzeBoots;
  115. public static ItemArmor cylinder;
  116. public static ItemArmor suitChestplate;
  117. public static ItemArmor suitLeggings;
  118. public static ItemArmor suitBoots;
  119. public static ItemArmor strawHat;
  120. // wands
  121. public static ItemWand woodenWand;
  122. public static ItemWand stoneWand;
  123. public static ItemWand copperWand;
  124. public static ItemWand bronzeWand;
  125. public static ItemWand ironWand;
  126. public static ItemWand goldWand;
  127. public static ItemWand emeraldWand;
  128. public static ItemWand redstoneWand;
  129. public static ItemWand lapisWand;
  130. public static ItemWand diamondWand;
  131. public static ItemWand silverWand;
  132. // sticks
  133. public static ItemStick woodenStick;
  134. public static ItemStick stoneStick;
  135. public static ItemStick copperStick;
  136. public static ItemStick bronzeStick;
  137. public static ItemStick ironStick;
  138. public static ItemStick goldStick;
  139. public static ItemStick diamondStick;
  140. // dagger
  141. public static ItemDagger woodenDagger;
  142. public static ItemDagger stoneDagger;
  143. public static ItemDagger copperDagger;
  144. public static ItemDagger bronzeDagger;
  145. public static ItemDagger ironDagger;
  146. public static ItemDagger goldDagger;
  147. public static ItemDagger diamondDagger;
  148. // hammer
  149. public static ItemHammer woodenHammer;
  150. public static ItemHammer stoneHammer;
  151. public static ItemHammer copperHammer;
  152. public static ItemHammer bronzeHammer;
  153. public static ItemHammer ironHammer;
  154. public static ItemHammer goldHammer;
  155. public static ItemHammer diamondHammer;
  156. // spear
  157. public static ItemSpear woodenSpear;
  158. public static ItemSpear stoneSpear;
  159. public static ItemSpear copperSpear;
  160. public static ItemSpear bronzeSpear;
  161. public static ItemSpear ironSpear;
  162. public static ItemSpear goldSpear;
  163. public static ItemSpear diamondSpear;
  164. // great sword
  165. public static ItemGreatSword woodenGreatSword;
  166. public static ItemGreatSword stoneGreatSword;
  167. public static ItemGreatSword copperGreatSword;
  168. public static ItemGreatSword bronzeGreatSword;
  169. public static ItemGreatSword ironGreatSword;
  170. public static ItemGreatSword goldGreatSword;
  171. public static ItemGreatSword diamondGreatSword;
  172. // great sword
  173. public static ItemBattleAxe woodenBattleAxe;
  174. public static ItemBattleAxe stoneBattleAxe;
  175. public static ItemBattleAxe copperBattleAxe;
  176. public static ItemBattleAxe bronzeBattleAxe;
  177. public static ItemBattleAxe ironBattleAxe;
  178. public static ItemBattleAxe goldBattleAxe;
  179. public static ItemBattleAxe diamondBattleAxe;
  180. // guns
  181. public static ItemBase revolverBullet;
  182. public static ItemBase musketAmmunition;
  183. public static ItemGun ironMusket;
  184. public static ItemGun silverMusket;
  185. public static ItemGun ironRevolver;
  186. public static ItemGun silverRevolver;
  187. // key
  188. //public static ItemKey woodenKey;
  189. public static ItemKey silverKey;
  190. public static ItemKey copperKey;
  191. public static ItemKey bronzeKey;
  192. public static ItemKey ironKey;
  193. public static ItemKey goldKey;
  194. //public static ItemKey diamondKey;
  195. // coins
  196. public static ItemBase copperCoin;
  197. public static ItemBase silverCoin;
  198. public static ItemBase goldCoin;
  199. // misc
  200. public static ItemScroll scroll;
  201. public static ItemBed realHayBed;
  202. public static ItemBase hayBundle;
  203. public static ItemBase batWing;
  204. public static ItemBase wolfFur;
  205. public static ItemBlockSpecial campFire;
  206. // food
  207. public static ItemColoredSoup coloredSoup;
  208. // herbs
  209. public static ItemHerbs herbStrong;
  210. public static ItemHerbs herbShadow;
  211. public static ItemHerbs herbXp;
  212. public static ItemHerbs herbSea;
  213. public static ItemHerbs herbGold;
  214. public static ItemHerbs herbBreathing;
  215. public static ItemHerbs herbFire;
  216. public static void init(IForgeRegistry<Item> r)
  217. {
  218. // nuggets and ingots
  219. copperIngot = register(r, new ItemBase("copper_ingot", "ingotCopper").setCreativeTab(CreativeTabs.MATERIALS));
  220. copperNugget = register(r, new ItemBase("copper_nugget", "copperNugget").setCreativeTab(CreativeTabs.MATERIALS));
  221. tinIngot = register(r, new ItemBase("tin_ingot", "ingotTin").setCreativeTab(CreativeTabs.MATERIALS));
  222. tinNugget = register(r, new ItemBase("tin_nugget", "tinNugget").setCreativeTab(CreativeTabs.MATERIALS));
  223. bronzeIngot = register(r, new ItemBase("bronze_ingot", "ingotBronze").setCreativeTab(CreativeTabs.MATERIALS));
  224. bronzeNugget = register(r, new ItemBase("bronze_nugget", "bronzeNugget").setCreativeTab(CreativeTabs.MATERIALS));
  225. silverIngot = register(r, new ItemBase("silver_ingot", "ingotSilver").setCreativeTab(CreativeTabs.MATERIALS));
  226. silverNugget = register(r, new ItemBase("silver_nugget", "silverNugget").setCreativeTab(CreativeTabs.MATERIALS));
  227. // repair items
  228. TOOL_COPPER.setRepairItem(new ItemStack(copperIngot));
  229. ARMOR_COPPER.setRepairItem(new ItemStack(copperIngot));
  230. TOOL_BRONZE.setRepairItem(new ItemStack(bronzeIngot));
  231. ARMOR_BRONZE.setRepairItem(new ItemStack(bronzeIngot));
  232. TOOL_EMERALD.setRepairItem(new ItemStack(Items.EMERALD));
  233. TOOL_REDSTONE.setRepairItem(new ItemStack(Items.REDSTONE));
  234. TOOL_LAPIS.setRepairItem(new ItemStack(Items.DYE, 1, EnumDyeColor.BLUE.getDyeDamage()));
  235. TOOL_SILVER.setRepairItem(new ItemStack(silverIngot));
  236. // tools and swords
  237. copperSword = register(r, new ItemSword(TOOL_COPPER, "copper_sword", "swordCopper"));
  238. copperShovel = register(r, new ItemSpade(TOOL_COPPER, "copper_shovel", "shovelCopper"));
  239. copperPickaxe = register(r, new ItemPickaxe(TOOL_COPPER, "copper_pickaxe", "pickaxeCopper"));
  240. copperAxe = register(r, new ItemAxe(TOOL_COPPER, 7, -3.1f, "copper_axe", "hatchetCopper"));
  241. copperHoe = register(r, new ItemHoe(TOOL_COPPER, "copper_hoe", "hoeCopper"));
  242. bronzeSword = register(r, new ItemSword(TOOL_BRONZE, "bronze_sword", "swordBronze"));
  243. bronzeShovel = register(r, new ItemSpade(TOOL_BRONZE, "bronze_shovel", "shovelBronze"));
  244. bronzePickaxe = register(r, new ItemPickaxe(TOOL_BRONZE, "bronze_pickaxe", "pickaxeBronze"));
  245. bronzeAxe = register(r, new ItemAxe(TOOL_BRONZE, 8, -3.0f, "bronze_axe", "hatchetBronze"));
  246. bronzeHoe = register(r, new ItemHoe(TOOL_BRONZE, "bronze_hoe", "hoeBronze"));
  247. // armor
  248. copperHelmet = register(r, new ItemArmor(ARMOR_COPPER, EntityEquipmentSlot.HEAD, "copper_helmet", "helmetCopper"));
  249. copperChestplate = register(r, new ItemArmor(ARMOR_COPPER, EntityEquipmentSlot.CHEST, "copper_chestplate", "chestplateCopper"));
  250. copperLeggings = register(r, new ItemArmor(ARMOR_COPPER, EntityEquipmentSlot.LEGS, "copper_leggings", "leggingsCopper"));
  251. copperBoots = register(r, new ItemArmor(ARMOR_COPPER, EntityEquipmentSlot.FEET, "copper_boots", "bootsCopper"));
  252. bronzeHelmet = register(r, new ItemArmor(ARMOR_BRONZE, EntityEquipmentSlot.HEAD, "bronze_helmet", "helmetBronze"));
  253. bronzeChestplate = register(r, new ItemArmor(ARMOR_BRONZE, EntityEquipmentSlot.CHEST, "bronze_chestplate", "chestplateBronze"));
  254. bronzeLeggings = register(r, new ItemArmor(ARMOR_BRONZE, EntityEquipmentSlot.LEGS, "bronze_leggings", "leggingsBronze"));
  255. bronzeBoots = register(r, new ItemArmor(ARMOR_BRONZE, EntityEquipmentSlot.FEET, "bronze_boots", "bootsBronze"));
  256. cylinder = register(r, new ItemCylinder(ARMOR_CYLINDER, "cylinder", "cylinder"));
  257. suitChestplate = register(r, new ItemArmor(ARMOR_SUIT, EntityEquipmentSlot.CHEST, "suit_chestplate", "chestplateSuit"));
  258. suitLeggings = register(r, new ItemArmor(ARMOR_SUIT, EntityEquipmentSlot.LEGS, "suit_leggings", "leggingsSuit"));
  259. suitBoots = register(r, new ItemArmor(ARMOR_SUIT, EntityEquipmentSlot.FEET, "suit_boots", "bootsSuit"));
  260. strawHat = register(r, new ItemHat(ARMOR_STRAW, "straw_hat", "hatStraw"));
  261. // wands
  262. woodenWand = register(r, new ItemWand("wood_wand", "wandWood", Item.ToolMaterial.WOOD, 1));
  263. stoneWand = register(r, new ItemWand("stone_wand", "wandStone", Item.ToolMaterial.STONE, 1));
  264. copperWand = register(r, new ItemWand("copper_wand", "wandCopper", TOOL_COPPER, 2));
  265. bronzeWand = register(r, new ItemWand("bronze_wand", "wandBronze", TOOL_BRONZE, 2));
  266. ironWand = register(r, new ItemWand("iron_wand", "wandIron", Item.ToolMaterial.IRON, 2));
  267. goldWand = register(r, new ItemWand("gold_wand", "wandGold", Item.ToolMaterial.GOLD, 6));
  268. emeraldWand = register(r, new ItemWand("emerald_wand", "wandEmerald", TOOL_EMERALD, 4));
  269. redstoneWand = register(r, new ItemWand("redstone_wand", "wandRedstone", TOOL_REDSTONE, 5));
  270. lapisWand = register(r, new ItemWand("lapis_wand", "wandLapis", TOOL_LAPIS, 6));
  271. diamondWand = register(r, new ItemWand("diamond_wand", "wandDiamond", Item.ToolMaterial.DIAMOND, 4));
  272. silverWand = register(r, new ItemWand("silver_wand", "wandSilver", TOOL_SILVER, 6));
  273. // sticks
  274. woodenStick = register(r, new ItemStick("wood_stick", "stickWood", Item.ToolMaterial.WOOD));
  275. stoneStick = register(r, new ItemStick("stone_stick", "stickStone", Item.ToolMaterial.STONE));
  276. copperStick = register(r, new ItemStick("copper_stick", "stickCopper", TOOL_COPPER));
  277. bronzeStick = register(r, new ItemStick("bronze_stick", "stickBronze", TOOL_BRONZE));
  278. ironStick = register(r, new ItemStick("iron_stick", "stickIron", Item.ToolMaterial.IRON));
  279. goldStick = register(r, new ItemStick("gold_stick", "stickGold", Item.ToolMaterial.GOLD));
  280. diamondStick = register(r, new ItemStick("diamond_stick", "stickDiamond", Item.ToolMaterial.DIAMOND));
  281. // dagger
  282. woodenDagger = register(r, new ItemDagger("wood_dagger", "daggerWood", Item.ToolMaterial.WOOD));
  283. stoneDagger = register(r, new ItemDagger("stone_dagger", "daggerStone", Item.ToolMaterial.STONE));
  284. copperDagger = register(r, new ItemDagger("copper_dagger", "daggerCopper", TOOL_COPPER));
  285. bronzeDagger = register(r, new ItemDagger("bronze_dagger", "daggerBronze", TOOL_BRONZE));
  286. ironDagger = register(r, new ItemDagger("iron_dagger", "daggerIron", Item.ToolMaterial.IRON));
  287. goldDagger = register(r, new ItemDagger("gold_dagger", "daggerGold", Item.ToolMaterial.GOLD));
  288. diamondDagger = register(r, new ItemDagger("diamond_dagger", "daggerDiamond", Item.ToolMaterial.DIAMOND));
  289. // hammer
  290. woodenHammer = register(r, new ItemHammer("wood_hammer", "hammerWood", Item.ToolMaterial.WOOD));
  291. stoneHammer = register(r, new ItemHammer("stone_hammer", "hammerStone", Item.ToolMaterial.STONE));
  292. copperHammer = register(r, new ItemHammer("copper_hammer", "hammerCopper", TOOL_COPPER));
  293. bronzeHammer = register(r, new ItemHammer("bronze_hammer", "hammerBronze", TOOL_BRONZE));
  294. ironHammer = register(r, new ItemHammer("iron_hammer", "hammerIron", Item.ToolMaterial.IRON));
  295. goldHammer = register(r, new ItemHammer("gold_hammer", "hammerGold", Item.ToolMaterial.GOLD));
  296. diamondHammer = register(r, new ItemHammer("diamond_hammer", "hammerDiamond", Item.ToolMaterial.DIAMOND));
  297. // spear
  298. woodenSpear = register(r, new ItemSpear("wood_spear", "spearWood", Item.ToolMaterial.WOOD));
  299. stoneSpear = register(r, new ItemSpear("stone_spear", "spearStone", Item.ToolMaterial.STONE));
  300. copperSpear = register(r, new ItemSpear("copper_spear", "spearCopper", TOOL_COPPER));
  301. bronzeSpear = register(r, new ItemSpear("bronze_spear", "spearBronze", TOOL_BRONZE));
  302. ironSpear = register(r, new ItemSpear("iron_spear", "spearIron", Item.ToolMaterial.IRON));
  303. goldSpear = register(r, new ItemSpear("gold_spear", "spearGold", Item.ToolMaterial.GOLD));
  304. diamondSpear = register(r, new ItemSpear("diamond_spear", "spearDiamond", Item.ToolMaterial.DIAMOND));
  305. // great sword
  306. woodenGreatSword = register(r, new ItemGreatSword("wood_greatsword", "greatSwordWood", Item.ToolMaterial.WOOD));
  307. stoneGreatSword = register(r, new ItemGreatSword("stone_greatsword", "greatSwordStone", Item.ToolMaterial.STONE));
  308. copperGreatSword = register(r, new ItemGreatSword("copper_greatsword", "greatSwordCopper", TOOL_COPPER));
  309. bronzeGreatSword = register(r, new ItemGreatSword("bronze_greatsword", "greatSwordBronze", TOOL_BRONZE));
  310. ironGreatSword = register(r, new ItemGreatSword("iron_greatsword", "greatSwordIron", Item.ToolMaterial.IRON));
  311. goldGreatSword = register(r, new ItemGreatSword("gold_greatsword", "greatSwordGold", Item.ToolMaterial.GOLD));
  312. diamondGreatSword = register(r, new ItemGreatSword("diamond_greatsword", "greatSwordDiamond", Item.ToolMaterial.DIAMOND));
  313. // battle axe
  314. woodenBattleAxe = register(r, new ItemBattleAxe("wood_battleaxe", "battleAxeWood", Item.ToolMaterial.WOOD));
  315. stoneBattleAxe = register(r, new ItemBattleAxe("stone_battleaxe", "battleAxeStone", Item.ToolMaterial.STONE));
  316. copperBattleAxe = register(r, new ItemBattleAxe("copper_battleaxe", "battleAxeCopper", TOOL_COPPER));
  317. bronzeBattleAxe = register(r, new ItemBattleAxe("bronze_battleaxe", "battleAxeBronze", TOOL_BRONZE));
  318. ironBattleAxe = register(r, new ItemBattleAxe("iron_battleaxe", "battleAxeIron", Item.ToolMaterial.IRON));
  319. goldBattleAxe = register(r, new ItemBattleAxe("gold_battleaxe", "battleAxeGold", Item.ToolMaterial.GOLD));
  320. diamondBattleAxe = register(r, new ItemBattleAxe("diamond_battleaxe", "battleAxeDiamond", Item.ToolMaterial.DIAMOND));
  321. // guns
  322. musketAmmunition = register(r, new ItemBase("musket_ammunition", "musketAmmunition").setCreativeTab(CreativeTabs.COMBAT));
  323. revolverBullet = register(r, new ItemBase("revolver_bullet", "revolverBullet").setCreativeTab(CreativeTabs.COMBAT));
  324. ironMusket = register(r, new ItemGun("iron_musket", "musketIron",
  325. Item.ToolMaterial.IRON, 312, musketAmmunition, 12, 0.2d, 80, 1,
  326. Sounds.MUSKET_SHOT, Sounds.MUSKET_RELOAD, Sounds.MUSKET_CRIT));
  327. silverMusket = register(r, new ItemGun("silver_musket", "musketSilver",
  328. TOOL_SILVER, 504, musketAmmunition, 12, 0.2d, 80, 1,
  329. Sounds.MUSKET_SHOT, Sounds.MUSKET_RELOAD, Sounds.MUSKET_CRIT));
  330. ironRevolver = register(r, new ItemGun("iron_revolver", "revolverIron",
  331. Item.ToolMaterial.IRON, 384, revolverBullet, 5, 20, 6,
  332. Sounds.REVOLVER_SHOT, Sounds.REVOLVER_RELOAD, Sounds.REVOLVER_CRIT));
  333. silverRevolver = register(r, new ItemGun("silver_revolver", "revolverSilver",
  334. TOOL_SILVER, 600, revolverBullet, 5, 20, 6,
  335. Sounds.REVOLVER_SHOT, Sounds.REVOLVER_RELOAD, Sounds.REVOLVER_CRIT));
  336. // key
  337. //woodenKey = register(r, new ItemKey("wood_key", "keyWood", Item.ToolMaterial.WOOD));
  338. silverKey = register(r, new ItemKey("silver_key", "keySilver", TOOL_SILVER));
  339. copperKey = register(r, new ItemKey("copper_key", "keyCopper", TOOL_COPPER));
  340. bronzeKey = register(r, new ItemKey("bronze_key", "keyBronze", TOOL_BRONZE));
  341. ironKey = register(r, new ItemKey("iron_key", "keyIron", Item.ToolMaterial.IRON));
  342. goldKey = register(r, new ItemKey("gold_key", "keyGold", Item.ToolMaterial.GOLD));
  343. //diamondKey = register(r, new ItemKey("diamond_key", "keyDiamond", Item.ToolMaterial.DIAMOND));
  344. // coins
  345. copperCoin = register(r, new ItemBase("coin_copper", "coinCopper").setCreativeTab(CreativeTabs.MISC));
  346. silverCoin = register(r, new ItemBase("coin_silver", "coinSilver").setCreativeTab(CreativeTabs.MISC));
  347. goldCoin = register(r, new ItemBase("coin_gold", "coinGold").setCreativeTab(CreativeTabs.MISC));
  348. // misc
  349. scroll = register(r, (ItemScroll) new ItemScroll("scroll", "scroll").setCreativeTab(CreativeTabs.MISC));
  350. realHayBed = register(r, new ItemBed("real_hay_bed", "realHayBed"));
  351. hayBundle = register(r, new ItemBase("hay_bundle", "bundleHay").setCreativeTab(CreativeTabs.MATERIALS));
  352. batWing = register(r, new ItemBase("bat_wing", "batWing").setCreativeTab(CreativeTabs.MATERIALS));
  353. wolfFur = register(r, new ItemBase("wolf_fur", "wolfFur").setCreativeTab(CreativeTabs.MATERIALS));
  354. // food
  355. coloredSoup = register(r, new ItemColoredSoup("colored_soup", "soupColored"));
  356. // herbs
  357. herbStrong = register(r, new ItemHerbs("herb_strong", "herbStrong", new PotionEffect(MobEffects.SPEED, 6000, 1)));
  358. herbShadow = register(r, new ItemHerbs("herb_shadow", "herbShadow", new PotionEffect(MobEffects.NIGHT_VISION, 3600, 0)));
  359. herbXp = register(r, new ItemHerbs("herb_xp", "herbXp"));
  360. herbSea = register(r, new ItemAquaHerb("herb_sea", "herbSea"));
  361. herbGold = register(r, new ItemGoldHerb("herb_gold", "herbGold"));
  362. herbBreathing = register(r, new ItemHerbs("herb_breathing", "herbBreathing", new PotionEffect(MobEffects.WATER_BREATHING, 2400, 0)));
  363. herbFire = register(r, new ItemHerbs("herb_fire", "herbFire", new PotionEffect(MobEffects.FIRE_RESISTANCE, 2400, 0)));
  364. // block special
  365. campFire = register(r, new ItemBlockSpecial("camp_fire", "camp_fire_item", "campFire", ModBlocks.campFire).setCreativeTab(CreativeTabs.DECORATIONS));
  366. try
  367. {
  368. for(int i = 0; i < 10; i++)
  369. {
  370. System.out.println("DOING EVIL SHIT");
  371. }
  372. register(r, Items.POTIONITEM, new ItemNoGlintPotion());
  373. register(r, Items.SPLASH_POTION, new ItemNoGlintSplashPotion());
  374. register(r, Items.LINGERING_POTION, new ItemNoGlintLingeringPotion());
  375. for(int i = 0; i < 10; i++)
  376. {
  377. System.out.println("DONE WITH EVIL SHIT");
  378. }
  379. }
  380. catch(Exception ex)
  381. {
  382. ex.printStackTrace();
  383. }
  384. // workaround
  385. EnumMetals.fixMetalIngots();
  386. }
  387. public static void fixSounds()
  388. {
  389. ironMusket.fixSounds(Sounds.MUSKET_SHOT, Sounds.MUSKET_RELOAD, Sounds.MUSKET_CRIT);
  390. silverMusket.fixSounds(Sounds.MUSKET_SHOT, Sounds.MUSKET_RELOAD, Sounds.MUSKET_CRIT);
  391. ironRevolver.fixSounds(Sounds.REVOLVER_SHOT, Sounds.REVOLVER_RELOAD, Sounds.REVOLVER_CRIT);
  392. silverRevolver.fixSounds(Sounds.REVOLVER_SHOT, Sounds.REVOLVER_RELOAD, Sounds.REVOLVER_CRIT);
  393. }
  394. private static <T extends Item> T register(IForgeRegistry<Item> r, T item)
  395. {
  396. r.register(item);
  397. if(item instanceof ItemModelProvider)
  398. {
  399. ((ItemModelProvider) item).registerItemModel(item);
  400. }
  401. return item;
  402. }
  403. private static void register(IForgeRegistry<Item> r, Item old, Item newItem)
  404. {
  405. newItem.setRegistryName(old.getRegistryName());
  406. r.register(newItem);
  407. }
  408. }