Guest User

Untitled

a guest
Oct 2nd, 2015
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.60 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.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43. //Hardened Steel
  44.  
  45. public static Item HSteelPickaxe;
  46.  
  47. public static Item HSteelShovel;
  48.  
  49. public static Item HSteelAxe;
  50.  
  51. public static Item HSteelSword;
  52.  
  53. public static Item HSteelHelmet;
  54.  
  55. public static Item HSteelChestplate;
  56.  
  57. public static Item HSteelLeggings;
  58.  
  59. public static Item HSteelBoots;
  60.  
  61.  
  62. public static ArmorMaterial hsteelarmor = EnumHelper.addArmorMaterial("hsteel", 25, new int[] {3, 8, 6, 3}, 25);
  63.  
  64.  
  65. @EventHandler
  66. public static void PreLoad(FMLPreInitializationEvent PreEvent) {
  67. HSteelIngot.mainRegistry();
  68. HSteelFurnace.mainRegistry();
  69. proxy.registerRenderInfo();
  70.  
  71. //EnumHelper
  72.  
  73. final ToolMaterial HSTEEL = EnumHelper.addToolMaterial("HSTEEL", 3, 800, 10.0F, 3.0F, 25);
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81. //Tools and sword
  82.  
  83. //Hardened Steel
  84.  
  85. //Pickaxe
  86.  
  87. HSteelPickaxe = new ItemHSteelPickaxe(HSTEEL);
  88.  
  89. RegisterHelper.registerItem(HSteelPickaxe);
  90.  
  91. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelPickaxe), new Object[] {"***", " # ", " # ", '*', HSteelIngot.hsteelingot, '#', Items.stick});
  92.  
  93. //Shovel
  94.  
  95. HSteelShovel = new ItemHSteelShovel(HSTEEL);
  96. RegisterHelper.registerItem(HSteelShovel);
  97. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelShovel), new Object[] {" * ", " # ", " # ", '*', HSteelIngot.hsteelingot, '#', Items.stick});
  98.  
  99.  
  100. //Axe
  101.  
  102. HSteelAxe = new ItemHSteelAxe(HSTEEL);
  103. RegisterHelper.registerItem(HSteelAxe);
  104. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelAxe), new Object[] {"** ", "*# ", " # ", '*', HSteelIngot.hsteelingot, '#', Items.stick});
  105.  
  106. //Sword
  107.  
  108. HSteelSword = new ItemHSteelSword(HSTEEL);
  109. RegisterHelper.registerItem(HSteelSword);
  110. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelSword), new Object[] {" * ", " * ", " # ", '*', HSteelIngot.hsteelingot, '#', Items.stick});
  111.  
  112.  
  113. //Armor
  114.  
  115.  
  116.  
  117.  
  118.  
  119. //Helmet
  120.  
  121.  
  122.  
  123.  
  124. HSteelHelmet = new ItemHSteelHelmet(hsteelarmor);
  125. RegisterHelper.registerItem(HSteelHelmet);
  126. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelHelmet), new Object[] {"***", "* *", " ", '*', HSteelIngot.hsteelingot});
  127.  
  128. //Chestplate
  129.  
  130.  
  131. HSteelChestplate = new ItemHSteelChestplate(hsteelarmor);
  132. RegisterHelper.registerItem(HSteelChestplate);
  133. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelChestplate), new Object [] {"* *", "***", "***", '*', HSteelIngot.hsteelingot});
  134.  
  135. //Leggings
  136.  
  137.  
  138. HSteelLeggings = new ItemHSteelLeggings(hsteelarmor);
  139. RegisterHelper.registerItem(HSteelLeggings);
  140. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelLeggings), new Object [] {"***", "* *", "* *", '*', HSteelIngot.hsteelingot});
  141.  
  142. //Boots
  143.  
  144.  
  145. HSteelBoots = new ItemHSteelBoots(hsteelarmor);
  146. RegisterHelper.registerItem(HSteelBoots);
  147. GameRegistry.addRecipe(new ItemStack (MainRegistry.HSteelBoots), new Object [] {" ", "* *", "* *", '*', HSteelIngot.hsteelingot});
  148.  
  149. //Random
  150. GameRegistry.addRecipe(new ItemStack(Items.saddle), new Object[] {"***", "*#*", " ", '*', Items.leather, '#', HSteelIngot.hsteelingot});
  151. GameRegistry.addSmelting(Items.rotten_flesh, new ItemStack(Items.leather), 1.0F);
  152.  
  153. }
  154.  
  155.  
  156.  
  157.  
  158. @EventHandler
  159. public static void load(FMLInitializationEvent event) {
  160.  
  161. RenderingRegistry.addNewArmourRendererPrefix("hsteel");
  162.  
  163. }
Advertisement
Add Comment
Please, Sign In to add comment