Guest User

Smithing.java

a guest
Nov 22nd, 2014
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.29 KB | None | 0 0
  1. package com.smith.mod;
  2.  
  3. import net.minecraft.block.Block;
  4. import net.minecraft.block.BlockFence;
  5. import net.minecraft.block.BlockFenceGate;
  6. import net.minecraft.block.material.Material;
  7. import net.minecraft.creativetab.CreativeTabs;
  8. import net.minecraft.init.Blocks;
  9. import net.minecraft.init.Items;
  10. import net.minecraft.item.Item;
  11. import net.minecraft.item.Item.ToolMaterial;
  12. import net.minecraft.item.ItemArmor.ArmorMaterial;
  13. import net.minecraft.item.ItemStack;
  14. import net.minecraftforge.common.util.EnumHelper;
  15.  
  16. import com.smith.mod.armor.BronzeArmor;
  17. import com.smith.mod.armor.HeatTreatedIronArmor;
  18. import com.smith.mod.armor.SteelArmor;
  19. import com.smith.mod.blocks.AluminiumOre;
  20. import com.smith.mod.blocks.AmazoniteOre;
  21. import com.smith.mod.blocks.CopperOre;
  22. import com.smith.mod.blocks.MagneziumOre;
  23. import com.smith.mod.blocks.MaterialBlock;
  24. import com.smith.mod.blocks.PlatinumOre;
  25. import com.smith.mod.blocks.TinOre;
  26. import com.smith.mod.doors.BlockCopperDoor;
  27. import com.smith.mod.doors.BlockCopperOxideDoor;
  28. import com.smith.mod.doors.BlockGoldenDoor;
  29. import com.smith.mod.doors.ItemCopperDoor;
  30. import com.smith.mod.doors.ItemCopperOxideDoor;
  31. import com.smith.mod.doors.ItemGoldenDoor;
  32. import com.smith.mod.fences.IronBlockFenceGate;
  33. import com.smith.mod.food.Alcohol;
  34. import com.smith.mod.handler.FuelHandler;
  35. import com.smith.mod.items.GlowingAxe;
  36. import com.smith.mod.items.GlowingHoe;
  37. import com.smith.mod.items.GlowingPickaxe;
  38. import com.smith.mod.items.GlowingShovel;
  39. import com.smith.mod.items.GlowingSword;
  40. import com.smith.mod.items.HeatTreatedIronAxe;
  41. import com.smith.mod.items.HeatTreatedIronHoe;
  42. import com.smith.mod.items.HeatTreatedIronPickaxe;
  43. import com.smith.mod.items.HeatTreatedIronShovel;
  44. import com.smith.mod.items.HeatTreatedIronSword;
  45. import com.smith.mod.items.SteelAxe;
  46. import com.smith.mod.items.SteelHoe;
  47. import com.smith.mod.items.SteelPickaxe;
  48. import com.smith.mod.items.SteelShovel;
  49. import com.smith.mod.items.SteelSword;
  50.  
  51. import cpw.mods.fml.common.Mod;
  52. import cpw.mods.fml.common.Mod.EventHandler;
  53. import cpw.mods.fml.common.Mod.Instance;
  54. import cpw.mods.fml.common.event.FMLInitializationEvent;
  55. import cpw.mods.fml.common.event.FMLPostInitializationEvent;
  56. import cpw.mods.fml.common.event.FMLPreInitializationEvent;
  57. import cpw.mods.fml.common.registry.GameRegistry;
  58. import cpw.mods.fml.relauncher.Side;
  59. import cpw.mods.fml.relauncher.SideOnly;
  60.  
  61.  
  62.  
  63. @Mod(modid = Smithing.modid, version = Smithing.version)
  64. public class Smithing {
  65.  
  66. public static final String modid = "Master Smith Stuff";
  67. public static final String version = "Alpha v1.0";
  68.  
  69. public static CreativeTabs smithingTab;
  70.  
  71. public static ToolMaterial GlowingMaterial = EnumHelper.addToolMaterial("GlowingMaterial", 2, 10, 20.0F, 2, 0);
  72. public static ToolMaterial HeatTreatedIronMaterial = EnumHelper.addToolMaterial("HeatTreatedIronMaterial", 2, 500, 7.0F, 2, 0);
  73. public static ToolMaterial SteelMaterial = EnumHelper.addToolMaterial("SteelMaterial", 2, 800, 8.0F, 3, 0);
  74. public static ArmorMaterial HeatTreatedIronArmorMaterial = EnumHelper.addArmorMaterial("HeatTreatedIronArmor", 17, new int[] {3, 6, 5, 3} , 12);
  75. public static ArmorMaterial SteelArmorMaterial = EnumHelper.addArmorMaterial("SteelArmor", 17, new int[] {3, 6, 5, 3} , 12);
  76. public static ArmorMaterial BronzeArmorMaterial = EnumHelper.addArmorMaterial("BronzeArmor", 10, new int[] {2, 3, 3, 2} , 12);
  77.  
  78. @Instance(modid)
  79. public static Smithing instance;
  80.  
  81. /**
  82. * Geeft een java-naam aan je item
  83. */
  84. //Items
  85. //Material
  86. public static Item itemGlowingIronIngot;
  87. public static Item itemHeatTreatedIronIngot;
  88. public static Item itemRustyIronIngot;
  89. public static Item itemAluminiumIngot;
  90. public static Item itemCopperIngot;
  91. public static Item itemCopperOxideIngot;
  92. public static Item itemTinIngot;
  93. public static Item itemSteelIngot;
  94. public static Item itemPlatinumIngot;
  95. public static Item itemBronzeIngot;
  96. public static Item itemAmazoniteCrystal;
  97. //Stuff
  98. public static Item itemIronStick;
  99. public static Item itemRustPowder;
  100. public static Item itemAluminiumPowder;
  101. public static Item itemThermite;
  102. //Fuel
  103. public static Item fuelMaltBucket;
  104. public static Item fuelBioEthanolBucket;
  105. public static Item fuelMagnezium;
  106. //Doors
  107. public static Item itemCopperDoor;
  108. public static Item itemCopperOxideDoor;
  109. public static Item itemGoldenDoor;
  110. //Blocks
  111. //Ores
  112. public static Block oreAluminiumOre;
  113. public static Block oreCopperOre;
  114. public static Block oreTinOre;
  115. public static Block orePlatinumOre;
  116. public static Block oreAmazoniteOre;
  117. public static Block oreMagneziumOre;
  118. //Material Blocks
  119. public static Block blockAluminiumBlock;
  120. public static Block blockCopperBlock;
  121. public static Block blockCopperOxideBlock;
  122. public static Block blockTinBlock;
  123. public static Block blockPlatinumBlock;
  124. public static Block blockAmazoniteBlock;
  125. public static Block blockBronzeBlock;
  126. public static Block blockSteelBlock;
  127. public static Block blockHeatTreatedIronBlock;
  128. //Doors
  129. public static Block entityCopperDoor;
  130. public static Block entityCopperOxideDoor;
  131. public static Block entityGoldenDoor;
  132. //Fences
  133. public static Block blockIronFence;
  134. public static Block blockIronFenceGate;
  135. //Tools
  136. //Glowing
  137. public static Item toolGlowingSword;
  138. public static Item toolGlowingPickaxe;
  139. public static Item toolGlowingAxe;
  140. public static Item toolGlowingShovel;
  141. public static Item toolGlowingHoe;
  142. //Heat Treated Iron
  143. public static Item toolHeatTreatedIronSword;
  144. public static Item toolHeatTreatedIronPickaxe;
  145. public static Item toolHeatTreatedIronAxe;
  146. public static Item toolHeatTreatedIronShovel;
  147. public static Item toolHeatTreatedIronHoe;
  148. //Steel
  149. public static Item toolSteelSword;
  150. public static Item toolSteelPickaxe;
  151. public static Item toolSteelAxe;
  152. public static Item toolSteelShovel;
  153. public static Item toolSteelHoe;
  154. //Armory
  155. //Heat Treated Iron
  156. public static int armorHeatTreatedIronHelmID;
  157. public static int armorHeatTreatedIronChestID;
  158. public static int armorHeatTreatedIronLegsID;
  159. public static int armorHeatTreatedIronBootsID;
  160.  
  161. public static Item armorHeatTreatedIronHelm;
  162. public static Item armorHeatTreatedIronChest;
  163. public static Item armorHeatTreatedIronLegs;
  164. public static Item armorHeatTreatedIronBoots;
  165. //Steel
  166. public static int armorSteelHelmID;
  167. public static int armorSteelChestID;
  168. public static int armorSteelLegsID;
  169. public static int armorSteelBootsID;
  170.  
  171. public static Item armorSteelHelm;
  172. public static Item armorSteelChest;
  173. public static Item armorSteelLegs;
  174. public static Item armorSteelBoots;
  175. //Bronze
  176. public static int armorBronzeHelmID;
  177. public static int armorBronzeChestID;
  178. public static int armorBronzeLegsID;
  179. public static int armorBronzeBootsID;
  180.  
  181. public static Item armorBronzeHelm;
  182. public static Item armorBronzeChest;
  183. public static Item armorBronzeLegs;
  184. public static Item armorBronzeBoots;
  185. @EventHandler
  186. public void PreInit(FMLPreInitializationEvent preEvent){
  187. smithingTab = new CreativeTabs("smithing") {
  188. @Override
  189. @SideOnly(Side.CLIENT)
  190. public Item getTabIconItem() {
  191. return Smithing.itemGlowingIronIngot;
  192. }
  193. };
  194.  
  195. /**
  196. * Hoe moet je item eruit zien/wat doet het?
  197. */
  198. //Items
  199. //Material
  200. itemGlowingIronIngot = new Item().setUnlocalizedName("GlowingIronIngot").setTextureName(modid + ":GlowingIronIngot").setCreativeTab(Smithing.smithingTab);
  201. itemHeatTreatedIronIngot = new Item().setUnlocalizedName("HeatTreatedIronIngot").setTextureName(modid + ":HeatTreatedIronIngot").setCreativeTab(Smithing.smithingTab);
  202. itemRustyIronIngot = new Item().setUnlocalizedName("RustyIronIngot").setTextureName(modid + ":RustyIronIngot").setCreativeTab(Smithing.smithingTab);
  203. itemAluminiumIngot = new Item().setUnlocalizedName("AluminiumIngot").setTextureName(modid + ":AluminiumIngot").setCreativeTab(Smithing.smithingTab);
  204. itemCopperIngot = new Item().setUnlocalizedName("CopperIngot").setTextureName(modid + ":CopperIngot").setCreativeTab(Smithing.smithingTab);
  205. itemCopperOxideIngot = new Item().setUnlocalizedName("CopperOxideIngot").setTextureName(modid + ":CopperOxideIngot").setCreativeTab(Smithing.smithingTab);
  206. itemTinIngot = new Item().setUnlocalizedName("TinIngot").setTextureName(modid + ":TinIngot").setCreativeTab(Smithing.smithingTab);
  207. itemSteelIngot = new Item().setUnlocalizedName("SteelIngot").setTextureName(modid + ":SteelIngot").setCreativeTab(Smithing.smithingTab);
  208. itemPlatinumIngot = new Item().setUnlocalizedName("PlatinumIngot").setTextureName(modid + ":PlatinumIngot").setCreativeTab(Smithing.smithingTab);
  209. itemBronzeIngot = new Item().setUnlocalizedName("BronzeIngot").setTextureName(modid + ":BronzeIngot").setCreativeTab(Smithing.smithingTab);
  210. itemAmazoniteCrystal = new Item().setUnlocalizedName("AmazoniteCrystal").setTextureName(modid + ":AmazoniteCrystal").setCreativeTab(Smithing.smithingTab);
  211. //Stuff
  212. itemIronStick = new Item().setUnlocalizedName("IronStick ").setTextureName(modid + ":IronStick").setCreativeTab(Smithing.smithingTab);
  213. itemRustPowder = new Item().setUnlocalizedName("RustPowder").setTextureName(modid + ":RustPowder").setCreativeTab(Smithing.smithingTab);
  214. itemAluminiumPowder = new Item().setUnlocalizedName("AluminiumPowder").setTextureName(modid + ":AluminiumPowder").setCreativeTab(Smithing.smithingTab);
  215. itemThermite = new Item().setUnlocalizedName("Thermite").setTextureName(modid + ":Thermite").setCreativeTab(Smithing.smithingTab);
  216. //Fuel
  217. fuelMaltBucket = new Item().setUnlocalizedName("MaltBucket").setTextureName(modid + ":MaltBucket").setCreativeTab(Smithing.smithingTab);
  218. fuelBioEthanolBucket = new Alcohol(2, 2F, false).setUnlocalizedName("BioEthanolBucket").setTextureName(modid + ":BioEthanolBucket").setCreativeTab(Smithing.smithingTab).setContainerItem(Items.bucket);
  219. fuelMagnezium = new Item().setUnlocalizedName("Magnezium").setTextureName(modid + ":Magnezium").setCreativeTab(Smithing.smithingTab);
  220. //Doors
  221. itemCopperDoor = new ItemCopperDoor(Material.iron).setUnlocalizedName("CopperDoor").setTextureName(modid + ":CopperDoor").setCreativeTab(Smithing.smithingTab);
  222. itemCopperOxideDoor = new ItemCopperOxideDoor(Material.iron).setUnlocalizedName("CopperOxideDoor").setTextureName(modid + ":CopperOxideDoor").setCreativeTab(Smithing.smithingTab);
  223. itemGoldenDoor = new ItemGoldenDoor(Material.iron).setUnlocalizedName("GoldenDoor").setTextureName(modid + ":GoldenDoor").setCreativeTab(Smithing.smithingTab);
  224. //Blocks
  225. //Ores
  226. oreAluminiumOre = new AluminiumOre(Material.rock).setBlockName("AluminiumOre");
  227. oreCopperOre = new CopperOre(Material.rock).setBlockName("CopperOre");
  228. oreTinOre = new TinOre(Material.rock).setBlockName("TinOre");
  229. orePlatinumOre = new PlatinumOre(Material.rock).setBlockName("PlatinumOre");
  230. oreAmazoniteOre = new AmazoniteOre(Material.rock).setBlockName("AmazoniteOre");
  231. oreMagneziumOre = new MagneziumOre(Material.rock).setBlockName("MagneziumOre");
  232. //Material Blocks
  233. blockAluminiumBlock = new MaterialBlock(Material.iron).setHardness(3.0F).setResistance(3.0F).setBlockName("AluminiumBlock");
  234. blockCopperBlock= new MaterialBlock(Material.rock).setHardness(2.5F).setResistance(2.5F).setBlockName("CopperBlock");
  235. blockCopperOxideBlock= new MaterialBlock(Material.rock).setHardness(2.5F).setResistance(2.5F).setBlockName("CopperOxideBlock");
  236. blockTinBlock = new MaterialBlock(Material.rock).setHardness(2.5F).setResistance(2.5F).setBlockName("TinBlock");
  237. blockPlatinumBlock = new MaterialBlock(Material.rock).setHardness(5.0F).setResistance(5.0F).setBlockName("PlatinumBlock");
  238. blockAmazoniteBlock = new MaterialBlock(Material.rock).setHardness(5.0F).setResistance(5.0F).setBlockName("AmazoniteBlock");
  239. blockBronzeBlock = new MaterialBlock(Material.rock).setHardness(3.5F).setResistance(3.5F).setBlockName("BronzeBlock");
  240. blockSteelBlock = new MaterialBlock(Material.rock).setHardness(4.0F).setResistance(4.0F).setBlockName("SteelBlock");
  241. blockHeatTreatedIronBlock = new MaterialBlock(Material.rock).setHardness(4.0F).setResistance(4.0F).setBlockName("HeatTreatedIronBlock");
  242. //Doors
  243. entityCopperDoor = new BlockCopperDoor(Material.iron).setHardness(2.0F).setStepSound(Block.soundTypeMetal).setBlockName("blockCopperDoor");
  244. entityCopperOxideDoor = new BlockCopperOxideDoor(Material.iron).setHardness(2.0F).setStepSound(Block.soundTypeMetal).setBlockName("blockCopperOxideDoor");
  245. entityGoldenDoor = new BlockGoldenDoor(Material.iron).setHardness(2.5F).setStepSound(Block.soundTypeMetal).setBlockName("blockGoldenDoor");
  246. //Fences
  247. blockIronFence = new BlockFence("iron_block", Material.iron).setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundTypeMetal).setBlockName("IronFence").setCreativeTab(Smithing.smithingTab);
  248. blockIronFenceGate = new IronBlockFenceGate().setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundTypeMetal).setBlockName("IronFenceGate").setCreativeTab(Smithing.smithingTab);
  249. //Tools
  250. //Glowing
  251. toolGlowingSword = new GlowingSword(GlowingMaterial).setUnlocalizedName("GlowingSword");
  252. toolGlowingPickaxe = new GlowingPickaxe(GlowingMaterial).setUnlocalizedName("GlowingPickaxe");
  253. toolGlowingAxe = new GlowingAxe(GlowingMaterial).setUnlocalizedName("GlowingAxe");
  254. toolGlowingShovel = new GlowingShovel(GlowingMaterial).setUnlocalizedName("GlowingShovel");
  255. toolGlowingHoe = new GlowingHoe(GlowingMaterial).setUnlocalizedName("GlowingHoe");
  256. //Heat Treated Iron
  257. toolHeatTreatedIronSword = new HeatTreatedIronSword(HeatTreatedIronMaterial).setUnlocalizedName("HeatTreatedIronSword");
  258. toolHeatTreatedIronPickaxe = new HeatTreatedIronPickaxe(HeatTreatedIronMaterial).setUnlocalizedName("HeatTreatedIronPickaxe");
  259. toolHeatTreatedIronAxe = new HeatTreatedIronAxe(HeatTreatedIronMaterial).setUnlocalizedName("HeatTreatedIronAxe");
  260. toolHeatTreatedIronShovel = new HeatTreatedIronShovel(HeatTreatedIronMaterial).setUnlocalizedName("HeatTreatedIronShovel");
  261. toolHeatTreatedIronHoe = new HeatTreatedIronHoe(HeatTreatedIronMaterial).setUnlocalizedName("HeatTreatedIronHoe");
  262. //Steel
  263. toolSteelSword = new SteelSword(SteelMaterial).setUnlocalizedName("SteelSword");
  264. toolSteelPickaxe = new SteelPickaxe(SteelMaterial).setUnlocalizedName("SteelPickaxe");
  265. toolSteelAxe = new SteelAxe(SteelMaterial).setUnlocalizedName("SteelAxe");
  266. toolSteelShovel = new SteelShovel(SteelMaterial).setUnlocalizedName("SteelShovel");
  267. toolSteelHoe = new SteelHoe(SteelMaterial).setUnlocalizedName("SteelHoe");
  268. //Armory
  269. //Heat Treated Iron
  270. armorHeatTreatedIronHelm = new HeatTreatedIronArmor(HeatTreatedIronArmorMaterial, armorHeatTreatedIronHelmID, 0).setUnlocalizedName("HeatTreatedIronHelm");
  271. armorHeatTreatedIronChest = new HeatTreatedIronArmor(HeatTreatedIronArmorMaterial, armorHeatTreatedIronChestID, 1).setUnlocalizedName("HeatTreatedIronChest");
  272. armorHeatTreatedIronLegs = new HeatTreatedIronArmor(HeatTreatedIronArmorMaterial, armorHeatTreatedIronLegsID, 2).setUnlocalizedName("HeatTreatedIronLegs");
  273. armorHeatTreatedIronBoots = new HeatTreatedIronArmor(HeatTreatedIronArmorMaterial, armorHeatTreatedIronBootsID, 3).setUnlocalizedName("HeatTreatedIronBoots");
  274. //Steel
  275. armorSteelHelm = new SteelArmor(SteelArmorMaterial, armorSteelHelmID, 0).setUnlocalizedName("SteelHelm");
  276. armorSteelChest = new SteelArmor(SteelArmorMaterial, armorSteelChestID, 1).setUnlocalizedName("SteelChest");
  277. armorSteelLegs = new SteelArmor(SteelArmorMaterial, armorSteelLegsID, 2).setUnlocalizedName("SteelLegs");
  278. armorSteelBoots = new SteelArmor(SteelArmorMaterial, armorSteelBootsID, 3).setUnlocalizedName("SteelBoots");
  279. //Bronze
  280. armorBronzeHelm = new BronzeArmor(BronzeArmorMaterial, armorBronzeHelmID, 0).setUnlocalizedName("BronzeHelm");
  281. armorBronzeChest = new BronzeArmor(BronzeArmorMaterial, armorBronzeChestID, 1).setUnlocalizedName("BronzeChest");
  282. armorBronzeLegs = new BronzeArmor(BronzeArmorMaterial, armorBronzeLegsID, 2).setUnlocalizedName("BronzeLegs");
  283. armorBronzeBoots = new BronzeArmor(BronzeArmorMaterial, armorBronzeBootsID, 3).setUnlocalizedName("BronzeBoots");
  284. /**
  285. * Registreerd een item
  286. */
  287. //Items
  288. //Material
  289. GameRegistry.registerItem(itemGlowingIronIngot, "GlowingIronIngot");
  290. GameRegistry.registerItem(itemHeatTreatedIronIngot, "HeatTreatedIronIngot");
  291. GameRegistry.registerItem(itemRustyIronIngot, "RustyIronIngot");
  292. GameRegistry.registerItem(itemAluminiumIngot, "AluminiumIngot");
  293. GameRegistry.registerItem(itemCopperIngot, "CopperIngot");
  294. GameRegistry.registerItem(itemCopperOxideIngot, "CopperOxideIngot");
  295. GameRegistry.registerItem(itemTinIngot, "TinIngot");
  296. GameRegistry.registerItem(itemBronzeIngot, "BronzeIngot");
  297. GameRegistry.registerItem(itemSteelIngot, "SteelIngot");
  298. GameRegistry.registerItem(itemPlatinumIngot, "PlatinumIngot");
  299. GameRegistry.registerItem(itemAmazoniteCrystal, "AmazoniteCrystal");
  300. //Stuff
  301. GameRegistry.registerItem(itemIronStick, "IronStick");
  302. GameRegistry.registerItem(itemRustPowder, "RustPowder");
  303. GameRegistry.registerItem(itemAluminiumPowder, "AluminiumPowder");
  304. GameRegistry.registerItem(itemThermite, "Thermite");
  305. //Fuel
  306. GameRegistry.registerItem(fuelMaltBucket, "MaltBucket");
  307. GameRegistry.registerItem(fuelBioEthanolBucket, "BioEthanolBucket");
  308. GameRegistry.registerItem(fuelMagnezium, "Magnezium");
  309. //Doors
  310. GameRegistry.registerItem(itemCopperDoor, "CopperDoor");
  311. GameRegistry.registerItem(itemCopperOxideDoor, "CopperOxideDoor");
  312. GameRegistry.registerItem(itemGoldenDoor, "GoldenDoor");
  313. //Blocks
  314. //Ores
  315. GameRegistry.registerBlock(oreAluminiumOre, "AluminiumOre");
  316. GameRegistry.registerBlock(oreCopperOre, "CopperOre");
  317. GameRegistry.registerBlock(oreTinOre, "TinOre");
  318. GameRegistry.registerBlock(orePlatinumOre, "PlatinumOre");
  319. GameRegistry.registerBlock(oreAmazoniteOre, "AmazoniteOre");
  320. GameRegistry.registerBlock(oreMagneziumOre, "MagneziumOre");
  321. //Material Blocks
  322. GameRegistry.registerBlock(blockAluminiumBlock, "AluminiumBlock");
  323. GameRegistry.registerBlock(blockCopperBlock, "CopperBlock");
  324. GameRegistry.registerBlock(blockCopperOxideBlock, "CopperOxideBlock");
  325. GameRegistry.registerBlock(blockTinBlock, "TinBlock");
  326. GameRegistry.registerBlock(blockPlatinumBlock, "PlatinumBlock");
  327. GameRegistry.registerBlock(blockAmazoniteBlock, "AmazoniteBlock");
  328. GameRegistry.registerBlock(blockBronzeBlock, "BronzeBlock");
  329. GameRegistry.registerBlock(blockSteelBlock, "SteelBlock");
  330. GameRegistry.registerBlock(blockHeatTreatedIronBlock, "HeatTreatedIronBlock");
  331. //Doors
  332. GameRegistry.registerBlock(entityCopperDoor, "blockCopperDoor");
  333. GameRegistry.registerBlock(entityCopperOxideDoor, "blockCopperOxideDoor");
  334. GameRegistry.registerBlock(entityGoldenDoor, "blockGoldenDoor");
  335. //Fences
  336. GameRegistry.registerBlock(blockIronFence, "IronFence");
  337. GameRegistry.registerBlock(blockIronFenceGate, "IronFenceGate");
  338. //Tools
  339. //Glowing
  340. GameRegistry.registerItem(toolGlowingSword, "GlowingSword");
  341. GameRegistry.registerItem(toolGlowingPickaxe, "GlowingPickaxe");
  342. GameRegistry.registerItem(toolGlowingAxe, "GlowingAxe");
  343. GameRegistry.registerItem(toolGlowingShovel, "GlowingShovel");
  344. GameRegistry.registerItem(toolGlowingHoe, "GlowingHoe");
  345. //Heat Treated Iron
  346. GameRegistry.registerItem(toolHeatTreatedIronSword, "HeatTreatedIronSword");
  347. GameRegistry.registerItem(toolHeatTreatedIronPickaxe, "HeatTreatedIronPickaxe");
  348. GameRegistry.registerItem(toolHeatTreatedIronAxe, "HeatTreatedIronAxe");
  349. GameRegistry.registerItem(toolHeatTreatedIronShovel, "HeatTreatedIronShovel");
  350. GameRegistry.registerItem(toolHeatTreatedIronHoe, "HeatTreatedIronHoe");
  351. //Steel
  352. GameRegistry.registerItem(toolSteelSword, "SteelSword");
  353. GameRegistry.registerItem(toolSteelPickaxe, "SteelPickaxe");
  354. GameRegistry.registerItem(toolSteelAxe, "SteelAxe");
  355. GameRegistry.registerItem(toolSteelShovel, "SteelShovel");
  356. GameRegistry.registerItem(toolSteelHoe, "SteelHoe");
  357. //Armory
  358. //Heat Treated Iron
  359. GameRegistry.registerItem(armorHeatTreatedIronHelm, "HeatTreatedIronHelm");
  360. GameRegistry.registerItem(armorHeatTreatedIronChest, "HeatTreatedIronChest");
  361. GameRegistry.registerItem(armorHeatTreatedIronLegs, "HeatTreatedIronLegs");
  362. GameRegistry.registerItem(armorHeatTreatedIronBoots, "HeatTreatedIronBoots");
  363. //Steel
  364. GameRegistry.registerItem(armorSteelHelm, "SteelHelm");
  365. GameRegistry.registerItem(armorSteelChest, "SteelChest");
  366. GameRegistry.registerItem(armorSteelLegs, "SteelLegs");
  367. GameRegistry.registerItem(armorSteelBoots, "SteelBoots");
  368. //Bronze
  369. GameRegistry.registerItem(armorBronzeHelm, "BronzeHelm");
  370. GameRegistry.registerItem(armorBronzeChest, "BronzeChest");
  371. GameRegistry.registerItem(armorBronzeLegs, "BronzeLegs");
  372. GameRegistry.registerItem(armorBronzeBoots, "BronzeBoots");
  373. }
  374.  
  375. @EventHandler
  376. public void Init(FMLInitializationEvent event){
  377. //ItemStacks
  378. ItemStack MaltBucketstack = new ItemStack(Smithing.fuelMaltBucket);
  379. ItemStack BioEthanolstack = new ItemStack(Smithing.fuelBioEthanolBucket);
  380. ItemStack AluminiumOrestack = new ItemStack(Smithing.oreAluminiumOre);
  381. ItemStack AluminiumIngotstack = new ItemStack(Smithing.itemAluminiumIngot);
  382. ItemStack CopperOrestack = new ItemStack(Smithing.oreCopperOre);
  383. ItemStack CopperIngotstack = new ItemStack(Smithing.itemCopperIngot);
  384. ItemStack TinOrestack = new ItemStack(Smithing.oreTinOre);
  385. ItemStack TinIngotstack = new ItemStack(Smithing.itemTinIngot);
  386. ItemStack PlatinumOrestack = new ItemStack(Smithing.orePlatinumOre);
  387. ItemStack PlatinumIngotstack = new ItemStack(Smithing.itemPlatinumIngot);
  388. //Items
  389. //Fuel
  390. GameRegistry.addShapelessRecipe(new ItemStack(Smithing.fuelMaltBucket), new Object[] { Items.reeds, Items.reeds, Items.reeds, Items.water_bucket.setContainerItem(null)});
  391. GameRegistry.addShapelessRecipe(new ItemStack(Smithing.fuelBioEthanolBucket), new Object[] { Items.reeds, Items.reeds, Items.water_bucket});
  392. //Stuff
  393. GameRegistry.addShapelessRecipe(new ItemStack(Smithing.itemThermite, 1), Smithing.itemAluminiumPowder, Smithing.itemRustPowder);
  394. GameRegistry.addShapelessRecipe(new ItemStack(Smithing.itemRustPowder, 1), Smithing.itemRustyIronIngot);
  395. //Blocks
  396. //Material Blocks
  397. GameRegistry.addShapelessRecipe(new ItemStack(Smithing.blockAluminiumBlock, 1), Smithing.itemAluminiumIngot, Smithing.itemAluminiumIngot, Smithing.itemAluminiumIngot, Smithing.itemAluminiumIngot, Smithing.itemAluminiumIngot, Smithing.itemAluminiumIngot, Smithing.itemAluminiumIngot, Smithing.itemAluminiumIngot, Smithing.itemAluminiumIngot);
  398. GameRegistry.addShapelessRecipe(new ItemStack(Smithing.blockCopperBlock, 1), Smithing.itemCopperIngot, Smithing.itemCopperIngot, Smithing.itemCopperIngot, Smithing.itemCopperIngot, Smithing.itemCopperIngot, Smithing.itemCopperIngot, Smithing.itemCopperIngot, Smithing.itemCopperIngot, Smithing.itemCopperIngot);
  399. GameRegistry.addShapelessRecipe(new ItemStack(Smithing.blockCopperOxideBlock, 1), Smithing.itemCopperOxideIngot, Smithing.itemCopperOxideIngot, Smithing.itemCopperOxideIngot, Smithing.itemCopperOxideIngot, Smithing.itemCopperOxideIngot, Smithing.itemCopperOxideIngot, Smithing.itemCopperOxideIngot, Smithing.itemCopperOxideIngot, Smithing.itemCopperOxideIngot);
  400. GameRegistry.addShapelessRecipe(new ItemStack(Smithing.blockTinBlock, 1), Smithing.itemTinIngot, Smithing.itemTinIngot, Smithing.itemTinIngot, Smithing.itemTinIngot, Smithing.itemTinIngot, Smithing.itemTinIngot, Smithing.itemTinIngot, Smithing.itemTinIngot, Smithing.itemTinIngot);
  401. GameRegistry.addShapelessRecipe(new ItemStack(Smithing.blockPlatinumBlock, 1), Smithing.itemPlatinumIngot, Smithing.itemPlatinumIngot, Smithing.itemPlatinumIngot, Smithing.itemPlatinumIngot, Smithing.itemPlatinumIngot, Smithing.itemPlatinumIngot, Smithing.itemPlatinumIngot, Smithing.itemPlatinumIngot, Smithing.itemPlatinumIngot);
  402. GameRegistry.addShapelessRecipe(new ItemStack(Smithing.blockAmazoniteBlock, 1), Smithing.itemAmazoniteCrystal, Smithing.itemAmazoniteCrystal, Smithing.itemAmazoniteCrystal, Smithing.itemAmazoniteCrystal, Smithing.itemAmazoniteCrystal, Smithing.itemAmazoniteCrystal, Smithing.itemAmazoniteCrystal, Smithing.itemAmazoniteCrystal, Smithing.itemAmazoniteCrystal);
  403. GameRegistry.addShapelessRecipe(new ItemStack(Smithing.blockBronzeBlock, 1), Smithing.itemBronzeIngot, Smithing.itemBronzeIngot, Smithing.itemBronzeIngot, Smithing.itemBronzeIngot, Smithing.itemBronzeIngot, Smithing.itemBronzeIngot, Smithing.itemBronzeIngot, Smithing.itemBronzeIngot, Smithing.itemBronzeIngot);
  404. GameRegistry.addShapelessRecipe(new ItemStack(Smithing.blockSteelBlock, 1), Smithing.itemSteelIngot, Smithing.itemSteelIngot, Smithing.itemSteelIngot, Smithing.itemSteelIngot, Smithing.itemSteelIngot, Smithing.itemSteelIngot, Smithing.itemSteelIngot, Smithing.itemSteelIngot, Smithing.itemSteelIngot);
  405. GameRegistry.addShapelessRecipe(new ItemStack(Smithing.blockHeatTreatedIronBlock, 1), Smithing.itemHeatTreatedIronIngot, Smithing.itemHeatTreatedIronIngot, Smithing.itemHeatTreatedIronIngot, Smithing.itemHeatTreatedIronIngot, Smithing.itemHeatTreatedIronIngot, Smithing.itemHeatTreatedIronIngot, Smithing.itemHeatTreatedIronIngot, Smithing.itemHeatTreatedIronIngot, Smithing.itemHeatTreatedIronIngot);
  406. //Tools
  407. //Glowing
  408. GameRegistry.addShapedRecipe(new ItemStack(Smithing.toolGlowingSword, 1), "X", "X", "Y", 'X', Smithing.itemGlowingIronIngot, 'Y', Smithing.itemIronStick);
  409. GameRegistry.addShapedRecipe(new ItemStack(Smithing.toolGlowingPickaxe, 1), "XXX", " Y ", " Y ", 'X', Smithing.itemGlowingIronIngot, 'Y', Smithing.itemIronStick);
  410. GameRegistry.addShapedRecipe(new ItemStack(Smithing.toolGlowingAxe, 1), "XX ", "XY ", " Y ", 'X', Smithing.itemGlowingIronIngot, 'Y', Smithing.itemIronStick);
  411. GameRegistry.addShapedRecipe(new ItemStack(Smithing.toolGlowingShovel, 1), "X", "Y", "Y", 'X', Smithing.itemGlowingIronIngot, 'Y', Smithing.itemIronStick);
  412. GameRegistry.addShapedRecipe(new ItemStack(Smithing.toolGlowingHoe, 1), "XX ", " Y ", " Y ", 'X', Smithing.itemGlowingIronIngot, 'Y', Smithing.itemIronStick);
  413. //Heat Treated Iron
  414. GameRegistry.addShapedRecipe(new ItemStack(Smithing.toolHeatTreatedIronSword, 1), "X", "X", "Y", 'X', Smithing.itemHeatTreatedIronIngot, 'Y', Smithing.itemIronStick);
  415. GameRegistry.addShapedRecipe(new ItemStack(Smithing.toolHeatTreatedIronPickaxe, 1), "XXX", " Y ", 'X', Smithing.itemHeatTreatedIronIngot, 'Y', Smithing.itemIronStick);
  416. GameRegistry.addShapedRecipe(new ItemStack(Smithing.toolHeatTreatedIronAxe, 1), "XX ", "XY ", " Y ", 'X', Smithing.itemHeatTreatedIronIngot, 'Y', Smithing.itemIronStick);
  417. GameRegistry.addShapedRecipe(new ItemStack(Smithing.toolHeatTreatedIronShovel, 1), "X", "Y", "Y", 'X', Smithing.itemHeatTreatedIronIngot, 'Y', Smithing.itemIronStick);
  418. GameRegistry.addShapedRecipe(new ItemStack(Smithing.toolHeatTreatedIronHoe, 1), "XX ", " Y ", " Y ", 'X', Smithing.itemHeatTreatedIronIngot, 'Y', Items.stick);
  419. //Furnace
  420. GameRegistry.addSmelting(MaltBucketstack, BioEthanolstack, (float) 0.35);
  421. GameRegistry.addSmelting(AluminiumOrestack, AluminiumIngotstack, (float) 0.35);
  422. GameRegistry.addSmelting(CopperOrestack, CopperIngotstack, (float) 0.35);
  423. GameRegistry.addSmelting(TinOrestack, TinIngotstack, (float) 0.35);
  424. GameRegistry.addSmelting(PlatinumOrestack, PlatinumIngotstack, (float) 0.35);
  425. //Fuel Handler
  426. GameRegistry.registerFuelHandler(new FuelHandler());
  427. }
  428.  
  429. @EventHandler
  430. public void PostInit(FMLPostInitializationEvent postEvent){
  431. }
  432. }
Advertisement
Add Comment
Please, Sign In to add comment