Guest User

Untitled

a guest
Feb 3rd, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.05 KB | None | 0 0
  1. package moreore.main;
  2.  
  3. import net.minecraft.block.Block;
  4. import net.minecraft.block.material.Material;
  5. import net.minecraft.creativetab.CreativeTabs;
  6. import net.minecraft.item.EnumArmorMaterial;
  7. import net.minecraft.item.EnumToolMaterial;
  8. import net.minecraft.item.ItemStack;
  9. import net.minecraft.item.Item;
  10. import net.minecraft.item.crafting.FurnaceRecipes;
  11. import net.minecraftforge.common.EnumHelper;
  12. import net.minecraftforge.common.MinecraftForge;
  13. import cpw.mods.fml.common.Mod;
  14. import cpw.mods.fml.common.Mod.EventHandler;
  15. import cpw.mods.fml.common.Mod.Instance;
  16. import cpw.mods.fml.common.SidedProxy;
  17. import cpw.mods.fml.common.event.FMLInitializationEvent;
  18. import cpw.mods.fml.common.event.FMLPostInitializationEvent;
  19. import cpw.mods.fml.common.event.FMLPreInitializationEvent;
  20. import cpw.mods.fml.common.network.NetworkMod;
  21. import cpw.mods.fml.common.registry.GameRegistry;
  22. import cpw.mods.fml.common.registry.LanguageRegistry;
  23.  
  24. @Mod(modid="More Ore", name="More Ore", version="0.0.1")
  25. @NetworkMod(clientSideRequired=true, serverSideRequired=false)
  26. public class Main {
  27.  
  28. // Initialization
  29. public EnumToolMaterial ruby = EnumHelper.addToolMaterial("Ruby", 3, 1000, 6.0F, 1.5F, 30);
  30. public static EnumArmorMaterial rubyArmor = EnumHelper.addArmorMaterial("Ruby", 60, new int[] {3, 7, 5, 2}, 30);
  31.  
  32. // Armor
  33. public static Item rubyHelmet;
  34. public static Item rubyChestplate;
  35. public static Item rubyLeggings;
  36. public static Item rubyBoots;
  37.  
  38. // Armor Settings
  39. rubyHelmet = new rubyHelmet(5500, rubyArmor, ModLoader.addArmor("rubyArmor"), 0);
  40. rubyHelmet = new rubyChestplate(5501, rubyArmor, ModLoader.addArmor("rubyArmor"), 1);
  41. rubyHelmet = new rubyLeggings(5502, rubyArmor, ModLoader.addArmor("rubyArmor"), 2);
  42. rubyHelmet = new rubbyBoots(5503, rubyArmor, ModLoader.addArmor("rubyArmor"), 3);
  43.  
  44. // Tools
  45. public final Item rubySword = new RubySword(5003, ruby);
  46. public final Item rubyAxe = new RubyAxe(5004, ruby);
  47. public final Item rubyPickaxe = new RubyPickaxe(5005, ruby);
  48. public final Item rubySpade = new RubySpade(5006, ruby);
  49. public final Item rubyHoe = new RubyHoe(5007, ruby);
  50.  
  51. // Ore Generation
  52. EventManager oreManager = new EventManager();
  53.  
  54. // Ruby Stuff
  55. public final static Block rubyBlock = new RubyBlock(511, Material.rock);
  56. public final static Block rubyOre = new RubyOre(512, Material.rock);
  57. public final static Item rubyGem = new Ruby(562);
  58.  
  59. }
  60.  
  61. @Instance("More Ore")
  62. public static Main instance;
  63.  
  64. @SidedProxy(clientSide="moreore.main.client.ClientProxy", serverSide="moreore.main.CommonProxy")
  65. public static CommonProxy proxy;
  66.  
  67. @EventHandler
  68. public void preInit(FMLPreInitializationEvent event) {
  69.  
  70. }
  71.  
  72. @EventHandler
  73. public void load(FMLInitializationEvent event) {
  74. proxy.registerRenderers();
  75.  
  76. // Ruby Tool Stacks
  77. ItemStack rubyStack = new ItemStack(rubyGem);
  78. ItemStack rubyStack2 = new ItemStack(rubyGem, 9);
  79. ItemStack stickStack = new ItemStack(Item.stick);
  80. ItemStack rubySwordStack = new ItemStack(rubySword);
  81. ItemStack rubyAxeStack = new ItemStack(rubyAxe);
  82. ItemStack rubyPickaxeStack = new ItemStack(rubyPickaxe);
  83. ItemStack rubySpadeStack = new ItemStack(rubySpade);
  84. ItemStack rubyHoeStack = new ItemStack(rubyHoe);
  85. ItemStack rubyBlockStack = new ItemStack(rubyBlock);
  86.  
  87. // Ore Generation
  88. GameRegistry.registerWorldGenerator(oreManager);
  89.  
  90. // Ruby Block
  91. GameRegistry.registerBlock(rubyBlock, "rubyBlock");
  92. LanguageRegistry.addName(rubyBlock, "Ruby Block");
  93. MinecraftForge.setBlockHarvestLevel(rubyBlock, "pickaxe", 1);
  94.  
  95. // Ruby Ore
  96. GameRegistry.registerBlock(rubyOre, "rubyOre");
  97. LanguageRegistry.addName(rubyOre, "Ruby Ore");
  98. MinecraftForge.setBlockHarvestLevel(rubyOre, "pickaxe", 2);
  99.  
  100. // Ruby Gem
  101. GameRegistry.registerItem(rubyGem, "rubyGem");
  102. LanguageRegistry.addName(rubyGem, "Ruby");
  103.  
  104. // Ruby Tools
  105. GameRegistry.registerItem(rubySword, "rubySword");
  106. LanguageRegistry.addName(rubySword, "Ruby Sword");
  107.  
  108. GameRegistry.registerItem(rubyAxe, "rubyAxe");
  109. LanguageRegistry.addName(rubyAxe, "Ruby Axe");
  110.  
  111. GameRegistry.registerItem(rubyPickaxe, "rubyPickaxe");
  112. LanguageRegistry.addName(rubyPickaxe, "Ruby Pickaxe");
  113.  
  114. GameRegistry.registerItem(rubySpade, "rubySpade");
  115. LanguageRegistry.addName(rubySpade, "Ruby Spade");
  116.  
  117. GameRegistry.registerItem(rubyHoe, "rubyHoe");
  118. LanguageRegistry.addName(rubyHoe, "Ruby Hoe");
  119.  
  120. // Ruby Recipes
  121. GameRegistry.addRecipe(rubyBlockStack, "yyy", "yyy", "yyy", 'y', rubyStack);
  122. GameRegistry.addShapelessRecipe(rubyStack2, rubyBlockStack);
  123. GameRegistry.addRecipe(rubySwordStack, " y ", " y ", " x ", 'x', stickStack, 'y', rubyStack);
  124. GameRegistry.addRecipe(rubyAxeStack, "yy ", "yx ", " x ", 'x', stickStack, 'y', rubyStack);
  125. GameRegistry.addRecipe(rubyPickaxeStack, "yyy", " x ", " x ", 'x', stickStack, 'y', rubyStack);
  126. GameRegistry.addRecipe(rubySpadeStack, " y ", " x ", " x ", 'x', stickStack, 'y', rubyStack);
  127. GameRegistry.addRecipe(rubyHoeStack, "yy ", " x ", " x ", 'x', stickStack, 'y', rubyStack);
  128.  
  129.  
  130. }
  131.  
  132. @EventHandler
  133. public void postInit(FMLPostInitializationEvent event) {
  134.  
  135. }
  136.  
  137. }
Advertisement
Add Comment
Please, Sign In to add comment