Guest User

main

a guest
Oct 1st, 2015
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.92 KB | None | 0 0
  1. package com.assassin.Main;
  2. import com.assassin.lib.*;
  3. import net.minecraft.entity.Entity;
  4. import com.assassin.help.RegisterHelper;
  5. import com.assassin.item.*;
  6.  
  7. import cpw.mods.fml.client.registry.RenderingRegistry;
  8. import cpw.mods.fml.common.Mod;
  9. import cpw.mods.fml.common.Mod.EventHandler;
  10. import cpw.mods.fml.common.SidedProxy;
  11. import cpw.mods.fml.common.event.FMLInitializationEvent;
  12. import cpw.mods.fml.common.event.FMLPostInitializationEvent;
  13. import cpw.mods.fml.common.event.FMLPreInitializationEvent;
  14. import cpw.mods.fml.common.registry.GameRegistry;
  15. import net.minecraft.block.Block;
  16. import net.minecraft.block.material.Material;
  17. import net.minecraft.client.gui.inventory.GuiFurnace;
  18. import net.minecraft.init.Blocks;
  19. import net.minecraft.init.Items;
  20. import net.minecraft.item.Item;
  21. import net.minecraft.item.ItemStack;
  22. import net.minecraft.item.Item.ToolMaterial;
  23. import net.minecraft.item.ItemArmor;
  24. import net.minecraft.item.ItemArmor.ArmorMaterial;
  25. import net.minecraftforge.common.util.EnumHelper;
  26. import com.assassin.blocks.*;
  27.  
  28. @Mod(modid = RefStrings.MODID , name = RefStrings.NAME , version = RefStrings.VERSION )
  29. public class MainRegistry {
  30.  
  31. @SidedProxy(clientSide = RefStrings.CLIENTSIDE , serverSide = RefStrings.SERVERSIDE )
  32. public static ServerProxy proxy;
  33.  
  34. //Item declarations
  35.  
  36. //Hardened Steel
  37.  
  38. public static Item HSteelPickaxe;
  39.  
  40. public static Item HSteelShovel;
  41.  
  42. public static Item HSteelAxe;
  43.  
  44. public static Item HSteelSword;
  45.  
  46. public static Item HSteelHelmet;
  47.  
  48. public static Item HSteelChestplate;
  49.  
  50. public static Item HSteelLeggings;
  51.  
  52. public static Item HSteelBoots;
  53.  
  54.  
  55. public static ArmorMaterial hsteelarmor = EnumHelper.addArmorMaterial("hsteel", 25, new int[] {3, 8, 6, 3}, 25);
  56.  
  57.  
  58. @EventHandler
  59. public static void PreLoad(FMLPreInitializationEvent PreEvent) {
  60. HSteelIngot.mainRegistry();
  61. HSteelFurnace.mainRegistry();
  62. proxy.registerRenderInfo();
  63.  
  64. //EnumHelper
  65.  
  66. final ToolMaterial HSTEEL = EnumHelper.addToolMaterial("HSTEEL", 3, 800, 10.0F, 3.0F, 25);
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74. //Tools and sword
  75.  
  76. //Hardened Steel
  77.  
  78. //Pickaxe
  79.  
  80. HSteelPickaxe = new ItemHSteelPickaxe(HSTEEL);
  81.  
  82. RegisterHelper.registerItem(HSteelPickaxe);
  83.  
  84. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelPickaxe), new Object[] {"***", " # ", " # ", '*', HSteelIngot.hsteelingot, '#', Items.stick});
  85.  
  86. //Shovel
  87.  
  88. HSteelShovel = new ItemHSteelShovel(HSTEEL);
  89. RegisterHelper.registerItem(HSteelShovel);
  90. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelShovel), new Object[] {" * ", " # ", " # ", '*', HSteelIngot.hsteelingot, '#', Items.stick});
  91.  
  92.  
  93. //Axe
  94.  
  95. HSteelAxe = new ItemHSteelAxe(HSTEEL);
  96. RegisterHelper.registerItem(HSteelAxe);
  97. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelAxe), new Object[] {"** ", "*# ", " # ", '*', HSteelIngot.hsteelingot, '#', Items.stick});
  98.  
  99. //Sword
  100.  
  101. HSteelSword = new ItemHSteelSword(HSTEEL);
  102. RegisterHelper.registerItem(HSteelSword);
  103. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelSword), new Object[] {" * ", " * ", " # ", '*', HSteelIngot.hsteelingot, '#', Items.stick});
  104.  
  105.  
  106. //Armor
  107.  
  108.  
  109.  
  110.  
  111.  
  112. //Helmet
  113.  
  114.  
  115.  
  116. Object HShelmetID;
  117. HSteelHelmet = new ItemHSteelHelmet(hsteelarmor);
  118. RegisterHelper.registerItem(HSteelHelmet);
  119. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelHelmet), new Object[] {"***", "* *", " ", '*', HSteelIngot.hsteelingot});
  120.  
  121. //Chestplate
  122.  
  123. Object HSchestplateID;
  124. HSteelChestplate = new ItemHSteelChestplate(hsteelarmor);
  125. RegisterHelper.registerItem(HSteelChestplate);
  126. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelChestplate), new Object [] {"* *", "***", "***", '*', HSteelIngot.hsteelingot});
  127.  
  128. //Leggings
  129.  
  130. Object HSggingsID;
  131. HSteelLeggings = new ItemHSteelLeggings(hsteelarmor);
  132. RegisterHelper.registerItem(HSteelLeggings);
  133. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelLeggings), new Object [] {"***", "* *", "* *", '*', HSteelIngot.hsteelingot});
  134.  
  135. //Boots
  136.  
  137. Object HSbootsID;
  138. HSteelBoots = new ItemHSteelBoots(hsteelarmor);
  139. RegisterHelper.registerItem(HSteelBoots);
  140. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelBoots), new Object [] {" ", "* *", "* *", '*', HSteelIngot.hsteelingot});
  141.  
  142. //Random
  143. GameRegistry.addRecipe(new ItemStack(Items.saddle), new Object[] {"***", "*#*", " ", '*', Items.leather, '#', HSteelIngot.hsteelingot});
  144. GameRegistry.addSmelting(Items.rotten_flesh, new ItemStack(Items.leather), 1.0F);
  145.  
  146. }
  147.  
  148.  
  149.  
  150.  
  151. @EventHandler
  152. public static void load(FMLInitializationEvent event) {
  153.  
  154. RenderingRegistry.addNewArmourRendererPrefix("hsteel");
  155.  
  156. }
  157.  
  158.  
  159.  
  160.  
  161.  
  162. @EventHandler
  163. public static void PostLoad(FMLPostInitializationEvent PreEvent) {
  164. }
Advertisement
Add Comment
Please, Sign In to add comment