Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package moreore.main;
- import net.minecraft.block.Block;
- import net.minecraft.block.material.Material;
- import net.minecraft.creativetab.CreativeTabs;
- import net.minecraft.item.EnumArmorMaterial;
- import net.minecraft.item.EnumToolMaterial;
- import net.minecraft.item.ItemStack;
- import net.minecraft.item.Item;
- import net.minecraft.item.crafting.FurnaceRecipes;
- import net.minecraftforge.common.EnumHelper;
- import net.minecraftforge.common.MinecraftForge;
- import cpw.mods.fml.common.Mod;
- import cpw.mods.fml.common.Mod.EventHandler;
- import cpw.mods.fml.common.Mod.Instance;
- import cpw.mods.fml.common.SidedProxy;
- import cpw.mods.fml.common.event.FMLInitializationEvent;
- import cpw.mods.fml.common.event.FMLPostInitializationEvent;
- import cpw.mods.fml.common.event.FMLPreInitializationEvent;
- import cpw.mods.fml.common.network.NetworkMod;
- import cpw.mods.fml.common.registry.GameRegistry;
- import cpw.mods.fml.common.registry.LanguageRegistry;
- @Mod(modid="More Ore", name="More Ore", version="0.0.1")
- @NetworkMod(clientSideRequired=true, serverSideRequired=false)
- public class Main {
- // Initialization
- public EnumToolMaterial ruby = EnumHelper.addToolMaterial("Ruby", 3, 1000, 6.0F, 1.5F, 30);
- public static EnumArmorMaterial rubyArmor = EnumHelper.addArmorMaterial("Ruby", 60, new int[] {3, 7, 5, 2}, 30);
- // Armor
- public static Item rubyHelmet;
- public static Item rubyChestplate;
- public static Item rubyLeggings;
- public static Item rubyBoots;
- // Armor Settings
- rubyHelmet = new rubyHelmet(5500, rubyArmor, ModLoader.addArmor("rubyArmor"), 0);
- rubyHelmet = new rubyChestplate(5501, rubyArmor, ModLoader.addArmor("rubyArmor"), 1);
- rubyHelmet = new rubyLeggings(5502, rubyArmor, ModLoader.addArmor("rubyArmor"), 2);
- rubyHelmet = new rubbyBoots(5503, rubyArmor, ModLoader.addArmor("rubyArmor"), 3);
- // Tools
- public final Item rubySword = new RubySword(5003, ruby);
- public final Item rubyAxe = new RubyAxe(5004, ruby);
- public final Item rubyPickaxe = new RubyPickaxe(5005, ruby);
- public final Item rubySpade = new RubySpade(5006, ruby);
- public final Item rubyHoe = new RubyHoe(5007, ruby);
- // Ore Generation
- EventManager oreManager = new EventManager();
- // Ruby Stuff
- public final static Block rubyBlock = new RubyBlock(511, Material.rock);
- public final static Block rubyOre = new RubyOre(512, Material.rock);
- public final static Item rubyGem = new Ruby(562);
- }
- @Instance("More Ore")
- public static Main instance;
- @SidedProxy(clientSide="moreore.main.client.ClientProxy", serverSide="moreore.main.CommonProxy")
- public static CommonProxy proxy;
- @EventHandler
- public void preInit(FMLPreInitializationEvent event) {
- }
- @EventHandler
- public void load(FMLInitializationEvent event) {
- proxy.registerRenderers();
- // Ruby Tool Stacks
- ItemStack rubyStack = new ItemStack(rubyGem);
- ItemStack rubyStack2 = new ItemStack(rubyGem, 9);
- ItemStack stickStack = new ItemStack(Item.stick);
- ItemStack rubySwordStack = new ItemStack(rubySword);
- ItemStack rubyAxeStack = new ItemStack(rubyAxe);
- ItemStack rubyPickaxeStack = new ItemStack(rubyPickaxe);
- ItemStack rubySpadeStack = new ItemStack(rubySpade);
- ItemStack rubyHoeStack = new ItemStack(rubyHoe);
- ItemStack rubyBlockStack = new ItemStack(rubyBlock);
- // Ore Generation
- GameRegistry.registerWorldGenerator(oreManager);
- // Ruby Block
- GameRegistry.registerBlock(rubyBlock, "rubyBlock");
- LanguageRegistry.addName(rubyBlock, "Ruby Block");
- MinecraftForge.setBlockHarvestLevel(rubyBlock, "pickaxe", 1);
- // Ruby Ore
- GameRegistry.registerBlock(rubyOre, "rubyOre");
- LanguageRegistry.addName(rubyOre, "Ruby Ore");
- MinecraftForge.setBlockHarvestLevel(rubyOre, "pickaxe", 2);
- // Ruby Gem
- GameRegistry.registerItem(rubyGem, "rubyGem");
- LanguageRegistry.addName(rubyGem, "Ruby");
- // Ruby Tools
- GameRegistry.registerItem(rubySword, "rubySword");
- LanguageRegistry.addName(rubySword, "Ruby Sword");
- GameRegistry.registerItem(rubyAxe, "rubyAxe");
- LanguageRegistry.addName(rubyAxe, "Ruby Axe");
- GameRegistry.registerItem(rubyPickaxe, "rubyPickaxe");
- LanguageRegistry.addName(rubyPickaxe, "Ruby Pickaxe");
- GameRegistry.registerItem(rubySpade, "rubySpade");
- LanguageRegistry.addName(rubySpade, "Ruby Spade");
- GameRegistry.registerItem(rubyHoe, "rubyHoe");
- LanguageRegistry.addName(rubyHoe, "Ruby Hoe");
- // Ruby Recipes
- GameRegistry.addRecipe(rubyBlockStack, "yyy", "yyy", "yyy", 'y', rubyStack);
- GameRegistry.addShapelessRecipe(rubyStack2, rubyBlockStack);
- GameRegistry.addRecipe(rubySwordStack, " y ", " y ", " x ", 'x', stickStack, 'y', rubyStack);
- GameRegistry.addRecipe(rubyAxeStack, "yy ", "yx ", " x ", 'x', stickStack, 'y', rubyStack);
- GameRegistry.addRecipe(rubyPickaxeStack, "yyy", " x ", " x ", 'x', stickStack, 'y', rubyStack);
- GameRegistry.addRecipe(rubySpadeStack, " y ", " x ", " x ", 'x', stickStack, 'y', rubyStack);
- GameRegistry.addRecipe(rubyHoeStack, "yy ", " x ", " x ", 'x', stickStack, 'y', rubyStack);
- }
- @EventHandler
- public void postInit(FMLPostInitializationEvent event) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment