Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int BlockID = 500;
- public static int ItemID = 6000;
- public static int rubyOreID, rubyBlockID, sapphireOreID, sapphireBlockID, pureOreID, pureBlockID;
- public static int rubyID, rubyPickID, rubySwordID, rubyShovelID, rubyAxeID, rubyHoeID, rubyHelmetID, rubyChestplateID, rubyLeggingsID, rubyBootsID, sapphireID;
- public static int sapphirePickID, sapphireSwordID, sapphireShovelID, sapphireAxeID, sapphireHoeID, sapphireHelmetID, sapphireChestplateID, sapphireLeggingsID, sapphireBootsID;
- public static int emeraldPickID, emeraldSwordID, emeraldShovelID, emeraldAxeID, emeraldHoeID, emeraldHelmetID, emeraldChestplateID, emeraldLeggingsID, emeraldBootsID;
- public static int firedGemID, pureGemID, purePickID, pureSwordID, pureShovelID, pureAxeID, pureHoeID, pureHelmetID, pureChestplateID, pureLeggingsID, pureBootsID;
- public static Block RubyOre, RubyBlock, SapphireOre, SapphireBlock, PureOre, PureBlock;
- public static Item Ruby, RubyPickaxe, RubySword, RubyShovel, RubyAxe, RubyHoe, RubyHelmet, RubyChestplate, RubyLeggings, RubyBoots;
- public static Item Sapphire, SapphirePickaxe, SapphireSword, SapphireShovel, SapphireAxe, SapphireHoe, SapphireHelmet, SapphireChestplate, SapphireLeggings, SapphireBoots;
- public static Item EmeraldPickaxe, EmeraldSword, EmeraldShovel, EmeraldAxe, EmeraldHoe, EmeraldHelmet, EmeraldChestplate, EmeraldLeggings, EmeraldBoots;
- public static Item FiredGem, PureGem, PurePickaxe, PureSword, PureShovel, PureAxe, PureHoe, PureHelmet, PureChestplate, PureLeggings, PureBoots;
- @EventHandler
- public void preInit(FMLPreInitializationEvent event) {
- Configuration config = new Configuration(event.getSuggestedConfigurationFile());
- config.load();
- rubyOreID = config.get("block", "rubyOre", BlockID+0).getInt();
- rubyBlockID = config.get("block", "rubyBlock", BlockID+2).getInt();
- sapphireOreID = config.get("block", "sapphireOre", BlockID+1).getInt();
- sapphireBlockID = config.get("block", "sapphireBlock", BlockID+3).getInt();
- pureOreID = config.get("block", "pureOre", BlockID+4).getInt();
- pureBlockID = config.get("block", "pureBlock", BlockID+5).getInt();
- rubyID = config.get("item", "ruby", ItemID+0).getInt()-256;
- rubyPickID = config.get("item", "rubyPickaxe", ItemID+1).getInt()-256;
- rubySwordID = config.get("item", "rubySword", ItemID+2).getInt()-256;
- rubyShovelID = config.get("item", "rubyShovel", ItemID+3).getInt()-256;
- rubyAxeID = config.get("item", "rubyAxe", ItemID+4).getInt()-256;
- rubyHoeID = config.get("item", "rubyHoe", ItemID+5).getInt()-256;
- //rubyHelmetID = config.get("item", "rubyHelmet", ItemID+6).getInt()-256;
- //rubyChestplateID = config.get("item", "rubyChestplate", ItemID+7).getInt()-256;
- //rubyLeggingsID = config.get("item", "rubyLeggings", ItemID+8).getInt()-256;
- //rubyBootsID = config.get("item", "rubyBoots", ItemID+9).getInt()-256;
- sapphireID = config.get("item", "sapphire", ItemID+10).getInt()-256;
- sapphirePickID = config.get("item", "sapphirePickaxe", ItemID+11).getInt()-256;
- sapphireSwordID = config.get("item", "sapphireSword", ItemID+12).getInt()-256;
- sapphireShovelID = config.get("item", "sapphireShovel", ItemID+13).getInt()-256;
- sapphireAxeID = config.get("item", "sapphireAxe", ItemID+14).getInt()-256;
- sapphireHoeID = config.get("item", "sapphireHoe", ItemID+15).getInt()-256;
- //sapphireHelmetID = config.get("item", "sapphireHelmet", ItemID+16).getInt()-256;
- //sapphireChestplateID = config.get("item", "sapphireChestplate", ItemID+17).getInt()-256;
- //sapphireLeggingsID = config.get("item", "sapphireLeggings", ItemID+18).getInt()-256;
- //sapphireBootsID = config.get("item", "sapphireBoots", ItemID+19).getInt()-256;
- emeraldPickID = config.get("item", "emeraldPickaxe", ItemID+20).getInt()-256;
- emeraldSwordID = config.get("item", "emeraldSword", ItemID+21).getInt()-256;
- emeraldShovelID = config.get("item", "emeraldShovel", ItemID+22).getInt()-256;
- emeraldAxeID = config.get("item", "emeraldAxe", ItemID+23).getInt()-256;
- emeraldHoeID = config.get("item", "emeraldHoe", ItemID+24).getInt()-256;
- //emeraldHelmetID = config.get("item", "emeraldHelmet", ItemID+25).getInt()-256;
- //emeraldChestplateID = config.get("item", "emeraldChestplate", ItemID+26).getInt()-256;
- //emeraldLeggingsID = config.get("item", "emeraldLeggings", ItemID+27).getInt()-256;
- //emeraldBootsID = config.get("item", "emeraldBoots", ItemID+28).getInt()-256;
- firedGemID = config.get("item", "firedGem", ItemID+29).getInt()-256;
- pureGemID = config.get("item", "pureGem", ItemID+30).getInt()-256;
- purePickID = config.get("item", "purePickaxe", ItemID+31).getInt()-256;
- pureSwordID = config.get("item", "pureSword", ItemID+32).getInt()-256;
- pureShovelID = config.get("item", "pureShovel", ItemID+33).getInt()-256;
- pureAxeID = config.get("item", "pureAxe", ItemID+34).getInt()-256;
- pureHoeID = config.get("item", "pureHoe", ItemID+35).getInt()-256;
- //pureHelmetID = config.get("item", "pureHelmet", ItemID+36).getInt()-256;
- //pureChestplateID = config.get("item", "pureChestplate", ItemID+37).getInt()-256;
- //pureLeggingsID = config.get("item", "pureLeggings", ItemID+38).getInt()-256;
- //pureBootsID = config.get("item", "pureBoots", ItemID+39).getInt()-256;
- config.save();
- RubyOre = new RubyOre(rubyOreID);
- RubyBlock = new RubyBlock(rubyBlockID);
- SapphireOre = new SapphireOre(sapphireOreID);
- SapphireBlock = new SapphireBlock(sapphireBlockID);
- PureOre = new PureOre(pureOreID);
- PureBlock = new PureBlock(pureBlockID);
- //Ruby
- Ruby = new Ruby(rubyID);
- RubyPickaxe = new RubyPickaxe(rubyPickID, toolRuby);
- RubySword = new RubySword(rubySwordID, toolRuby);
- RubyShovel = new RubyShovel(rubyShovelID, toolRuby);
- RubyAxe = new RubyAxe(rubyAxeID, toolRuby);
- RubyHoe = new RubyHoe(rubyHoeID, toolRuby);
- //RubyHelmet = new RubyHelmet(rubyHelmetID, armorRuby);
- //RubyChestplate = new RubyChestplate(rubyChestplateID, armorRuby);
- //RubyLeggings = new RubyLeggings(rubyLeggingsID, armorRuby);
- //RubyBoots = new RubyBoots(rubyBootsID, armorRuby);
- //Sapphire
- Sapphire = new Sapphire(sapphireID);
- SapphirePickaxe = new SapphirePickaxe(sapphirePickID, toolSapphire);
- SapphireSword = new SapphireSword(sapphireSwordID, toolSapphire);
- SapphireShovel = new SapphireShovel(sapphireShovelID, toolSapphire);
- SapphireAxe = new SapphireAxe(sapphireAxeID, toolSapphire);
- SapphireHoe = new SapphireHoe(sapphireHoeID, toolSapphire);
- //SapphireHelmet = new SapphireHelmet(sapphireHelmetID, armorSapphire);
- //SapphireChestplate = new SapphireChestplate(sapphireChestplateID, armorSapphire);
- //SapphireLeggings = new SapphireLeggings(sapphireLeggingsID, armorSapphire);
- //SapphireBoots = new SapphireBoots(sapphireBootsID, armorSapphire);
- //Emerald
- EmeraldPickaxe = new EmeraldPickaxe(emeraldPickID, toolEmerald);
- EmeraldSword = new EmeraldSword(emeraldSwordID, toolEmerald);
- EmeraldShovel = new EmeraldShovel(emeraldShovelID, toolEmerald);
- EmeraldAxe = new EmeraldAxe(emeraldAxeID, toolEmerald);
- EmeraldHoe = new EmeraldHoe(emeraldHoeID, toolEmerald);
- //EmeraldHelmet = new EmeraldHelmet(emeraldHelmetID, armorEmerald);
- //EmeraldChestplate = new EmeraldChestplate(emeraldChestplateID, armorEmerald);
- //EmeraldLeggings = new EmeraldLeggings(emeraldLeggingsID, armorEmerrald);
- //EmeraldBoots = new EmeraldBoots(emeraldBootsID, armorEmerald);
- //PureGem
- FiredGem = new FiredGem(firedGemID);
- PureGem = new PureGem(pureGemID);
- PurePickaxe = new PurePickaxe(purePickID, toolPure);
- PureSword = new PureSword(pureSwordID, toolPure);
- PureShovel = new PureShovel(pureShovelID, toolPure);
- PureAxe = new PureAxe(pureAxeID, toolPure);
- PureHoe = new PureHoe(pureHoeID, toolPure);
- //PureHelmet = new PureHelmet(pureHelmetID, armorPure);
- //PureChestplate = new PureChestplate(pureChestplateID, armorPure);
- //PureLeggings = new PureLeggings(pureLeggingsID, armorPure);
- //PureBoots = new PureBoots(pureBootsID, armorPure);
- }
- @EventHandler
- public void load(FMLInitializationEvent event) {
- //Item data
- LanguageRegistry.addName(Ruby, "Ruby");
- GameRegistry.addShapelessRecipe(new ItemStack(Gem.Ruby, 9), new ItemStack(Gem.RubyBlock));
- LanguageRegistry.addName(Sapphire, "Sapphire");
- GameRegistry.addShapelessRecipe(new ItemStack(Gem.Sapphire, 9), new ItemStack(Gem.SapphireBlock));
- LanguageRegistry.addName(FiredGem, "Fired Gem");
- GameRegistry.addSmelting(Item.emerald.itemID, new ItemStack(Gem.FiredGem), 1.0F);
- GameRegistry.addSmelting(Gem.Ruby.itemID, new ItemStack(Gem.FiredGem), 1.0F);
- GameRegistry.addSmelting(Gem.Sapphire.itemID, new ItemStack(Gem.FiredGem), 1.0F);
- LanguageRegistry.addName(PureGem, "Pure Gem");
- GameRegistry.addRecipe(new ItemStack(Gem.PureGem, 1), new Object [] {"xxx", "xxx", "xxx", 'x', FiredGem});
- GameRegistry.addShapelessRecipe(new ItemStack(Gem.PureGem, 9), new ItemStack(Gem.PureBlock));
- //Tool data
- //Ruby
- LanguageRegistry.addName(RubyPickaxe, "Ruby Pickaxe");
- GameRegistry.addRecipe(new ItemStack(Gem.RubyPickaxe, 1), new Object [] {"xxx", " y ", " y ", 'x', Ruby, 'y', Item.stick});
- LanguageRegistry.addName(RubySword, "Ruby Sword");
- GameRegistry.addRecipe(new ItemStack(Gem.RubySword, 1), new Object [] {" x ", " x ", " y ", 'x', Ruby, 'y', Item.stick});
- LanguageRegistry.addName(RubyAxe, "Ruby Axe");
- GameRegistry.addRecipe(new ItemStack(Gem.RubyAxe, 1), new Object [] {"xx ", "xy ", " y ", 'x', Ruby, 'y', Item.stick});
- LanguageRegistry.addName(RubyShovel, "Ruby Shovel");
- GameRegistry.addRecipe(new ItemStack(Gem.RubyShovel, 1), new Object [] {" x ", " y ", " y ", 'x', Ruby, 'y', Item.stick});
- LanguageRegistry.addName(RubyHoe, "Ruby Hoe");
- //GameRegistry.addRecipe(new ItemStack(Gem.RubyHoe, 1), new Object [] {"xx ", " y ", " y ", 'x', Ruby, 'y', Item.stick});
- //LanguageRegistry.addName(RubyHelmet, "Ruby Helmet");
- //GameRegistry.addRecipe(new ItemStack(Gem.RubyHelmet, 1), new Object [] {"xxx", "x x", 'x', Ruby});
- //LanguageRegistry.addName(RubyChestplate, "Ruby Chestplate");
- //GameRegistry.addRecipe(new ItemStack(Gem.RubyChestplate, 1), new Object [] {"x x", "xxx", "xxx", 'x', Ruby});
- //LanguageRegistry.addName(RubyLeggings, "Ruby Leggings");
- //GameRegistry.addRecipe(new ItemStack(Gem.RubyLeggings, 1), new Object [] {"xxx", "x x", "x x", 'x', Ruby});
- //LanguageRegistry.addName(RubyBoots, "Ruby Boots");
- //GameRegistry.addRecipe(new ItemStack(Gem.RubyBoots, 1), new Object [] {"x x", "x x", 'x', Ruby});
- //Sapphire
- LanguageRegistry.addName(SapphirePickaxe, "Sapphire Pickaxe");
- GameRegistry.addRecipe(new ItemStack(Gem.SapphirePickaxe, 1), new Object [] {"xxx", " y ", " y ", 'x', Sapphire, 'y', Item.stick});
- LanguageRegistry.addName(SapphireSword, "Sapphire Sword");
- GameRegistry.addRecipe(new ItemStack(Gem.SapphireSword, 1), new Object [] {" x ", " x ", " y ", 'x', Sapphire, 'y', Item.stick});
- LanguageRegistry.addName(SapphireAxe, "Sapphire Axe");
- GameRegistry.addRecipe(new ItemStack(Gem.SapphireAxe, 1), new Object [] {"xx ", "xy ", " y ", 'x', Sapphire, 'y', Item.stick});
- LanguageRegistry.addName(SapphireShovel, "Sapphire Shovel");
- GameRegistry.addRecipe(new ItemStack(Gem.SapphireShovel, 1), new Object [] {" x ", " y ", " y ", 'x', Sapphire, 'y', Item.stick});
- LanguageRegistry.addName(SapphireHoe, "Sapphire Hoe");
- GameRegistry.addRecipe(new ItemStack(Gem.SapphireHoe, 1), new Object [] {"xx ", " y ", " y ", 'x', Sapphire, 'y', Item.stick});
- //LanguageRegistry.addName(SapphireHelmet, "Sapphire Helmet");
- //GameRegistry.addRecipe(new ItemStack(Gem.SapphireHelmet, 1), new Object [] {"xxx", "x x", 'x', Sapphire});
- //LanguageRegistry.addName(SapphireChestplate, "Sapphire Chestplate");
- //GameRegistry.addRecipe(new ItemStack(Gem.SapphireChestplate, 1), new Object [] {"x x", "xxx", "xxx", 'x', Sapphire});
- //LanguageRegistry.addName(SapphireLeggings, "Sapphire Leggings");
- //GameRegistry.addRecipe(new ItemStack(Gem.SapphireLeggings, 1), new Object [] {"xxx", "x x", "x x", 'x', Sapphire});
- //LanguageRegistry.addName(SapphireBoots, "Sapphire Boots");
- //GameRegistry.addRecipe(new ItemStack(Gem.SapphireBoots, 1), new Object [] {"x x", "x x", 'x', Sapphire});
- //Emerald
- LanguageRegistry.addName(EmeraldPickaxe, "Emerald Pickaxe");
- GameRegistry.addRecipe(new ItemStack(Gem.EmeraldPickaxe, 1), new Object [] {"xxx", " y ", " y ", 'x', Item.emerald, 'y', Item.stick});
- LanguageRegistry.addName(EmeraldSword, "Emerald Sword");
- GameRegistry.addRecipe(new ItemStack(Gem.EmeraldSword, 1), new Object [] {" x ", " x ", " y ", 'x', Item.emerald, 'y', Item.stick});
- LanguageRegistry.addName(EmeraldAxe, "Emerald Axe");
- GameRegistry.addRecipe(new ItemStack(Gem.EmeraldAxe, 1), new Object [] {"xx ", "xy ", " y ", 'x', Item.emerald, 'y', Item.stick});
- LanguageRegistry.addName(EmeraldShovel, "Emerald Shovel");
- GameRegistry.addRecipe(new ItemStack(Gem.EmeraldShovel, 1), new Object [] {" x ", " y ", " y ", 'x', Item.emerald, 'y', Item.stick});
- LanguageRegistry.addName(EmeraldHoe, "Emerald Hoe");
- GameRegistry.addRecipe(new ItemStack(Gem.EmeraldHoe, 1), new Object [] {"xx ", " y ", " y ", 'x', Item.emerald, 'y', Item.stick});
- //LanguageRegistry.addName(EmeraldHelmet, "Emerald Helmet");
- //GameRegistry.addRecipe(new ItemStack(Gem.EmeraldHelmet, 1), new Object [] {"xxx", "x x", 'x', Item.emerald});
- //LanguageRegistry.addName(EmeraldChestplate, "Emerald Chestplate");
- //GameRegistry.addRecipe(new ItemStack(Gem.EmeraldChestplate, 1), new Object [] {"x x", "xxx", "xxx", 'x', Item.emerald});
- //LanguageRegistry.addName(EmeraldLeggings, "Emerald Leggings");
- //GameRegistry.addRecipe(new ItemStack(Gem.EmeraldLeggings, 1), new Object [] {"xxx", "x x", "x x", 'x', Item.emerald});
- //LanguageRegistry.addName(EmeraldBoots, "Emerald Boots");
- //GameRegistry.addRecipe(new ItemStack(Gem.EmeraldBoots, 1), new Object [] {"x x", "x x", 'x', Item.emerald});
- //Pure Gem
- LanguageRegistry.addName(PurePickaxe, "Pure Pickaxe");
- GameRegistry.addRecipe(new ItemStack(Gem.PurePickaxe, 1), new Object [] {"xxx", " y ", " y ", 'x', PureGem, 'y', Item.stick});
- LanguageRegistry.addName(PureSword, "Pure Sword");
- GameRegistry.addRecipe(new ItemStack(Gem.PureSword, 1), new Object [] {" x ", " x ", " y ", 'x', PureGem, 'y', Item.stick});
- LanguageRegistry.addName(PureAxe, "Pure Axe");
- GameRegistry.addRecipe(new ItemStack(Gem.PureAxe, 1), new Object [] {"xx ", "xy ", " y ", 'x', PureGem, 'y', Item.stick});
- LanguageRegistry.addName(PureShovel, "Pure Shovel");
- GameRegistry.addRecipe(new ItemStack(Gem.PureShovel, 1), new Object [] {" x ", " y ", " y ", 'x', PureGem, 'y', Item.stick});
- LanguageRegistry.addName(PureHoe, "Pure Hoe");
- GameRegistry.addRecipe(new ItemStack(Gem.PureHoe, 1), new Object [] {"xx ", " y ", " y ", 'x', PureGem, 'y', Item.stick});
- //LanguageRegistry.addName(PureHelmet, "Pure Helmet");
- //GameRegistry.addRecipe(new ItemStack(Gem.PureHelmet, 1), new Object [] {"xxx", "x x", 'x', PureGem});
- //LanguageRegistry.addName(PureChestplate, "Pure Chestplate");
- //GameRegistry.addRecipe(new ItemStack(Gem.PureChestplate, 1), new Object [] {"x x", "xxx", "xxx", 'x', PureGem});
- //LanguageRegistry.addName(PureLeggings, "Pure Leggings");
- //GameRegistry.addRecipe(new ItemStack(Gem.PureLeggings, 1), new Object [] {"xxx", "x x", "x x", 'x', PureGem});
- //LanguageRegistry.addName(PureBoots, "Pure Boots");
- //GameRegistry.addRecipe(new ItemStack(Gem.PureBoots, 1), new Object [] {"x x", "x x", 'x', PureGem});
- //Block data
- LanguageRegistry.addName(RubyOre, "Ruby Ore");
- MinecraftForge.setBlockHarvestLevel(RubyOre, "pickaxe", 2);
- GameRegistry.registerBlock(RubyOre, "RubyOre");
- LanguageRegistry.addName(RubyBlock, "Block of Ruby");
- MinecraftForge.setBlockHarvestLevel(RubyBlock, "pickaxe", 2);
- GameRegistry.registerBlock(RubyBlock, "RubyBlock");
- GameRegistry.addRecipe(new ItemStack(Gem.RubyBlock), "xxx", "xxx", "xxx", 'x', Ruby);
- LanguageRegistry.addName(SapphireOre, "Sapphire Ore");
- MinecraftForge.setBlockHarvestLevel(SapphireOre, "pickaxe", 2);
- GameRegistry.registerBlock(SapphireOre, "SapphireOre");
- LanguageRegistry.addName(SapphireBlock, "Block of Sapphire");
- MinecraftForge.setBlockHarvestLevel(SapphireBlock, "pickaxe", 2);
- GameRegistry.registerBlock(SapphireBlock, "SapphireBlock");
- GameRegistry.addRecipe(new ItemStack(Gem.SapphireBlock), "xxx", "xxx", "xxx", 'x', Sapphire);
- LanguageRegistry.addName(PureOre, "Pure Ore");
- MinecraftForge.setBlockHarvestLevel(PureOre, "pickaxe", 3);
- GameRegistry.registerBlock(PureOre, "PureOre");
- LanguageRegistry.addName(PureBlock, "Pure Block");
- MinecraftForge.setBlockHarvestLevel(PureBlock, "pickaxe", 2);
- GameRegistry.registerBlock(PureBlock, "PureBlock");
- GameRegistry.addRecipe(new ItemStack(Gem.PureBlock), "xxx", "xxx", "xxx", 'x', PureGem);
- //WorldGen data
- GameRegistry.registerWorldGenerator(new RubyOreWorldGeneration());
- GameRegistry.registerWorldGenerator(new SapphireOreWorldGeneration());
- GameRegistry.registerWorldGenerator(new PureOreWorldGeneration());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement