From 406be48069589060f05afa0c5cb2a0d2413c37b4 Mon Sep 17 00:00:00 2001 From: Aidan Brady Date: Sun, 1 Dec 2013 00:04:20 -0500 Subject: [PATCH] Revert "Added energy tablet to OreDict for recipes" This reverts commit de4742e65c1199aa16fb9738c8db8f3aa4898ff4. --- common/mekanism/common/Mekanism.java | 1081 +++++++++++++------------- 1 file changed, 555 insertions(+), 526 deletions(-) diff --git a/common/mekanism/common/Mekanism.java b/common/mekanism/common/Mekanism.java index b0168fddc..4186c01c2 100644 --- a/common/mekanism/common/Mekanism.java +++ b/common/mekanism/common/Mekanism.java @@ -120,75 +120,74 @@ import cpw.mods.fml.common.registry.GameRegistry; /** * Mekanism - the mod that doesn't have a category. - * * @author AidanBrady - * + * */ @Mod(modid = "Mekanism", name = "Mekanism", version = "5.6.0") -@NetworkMod(channels = { "MEK" }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class) +@NetworkMod(channels = {"MEK"}, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class) public class Mekanism { /** Mekanism logger instance */ public static Logger logger = Logger.getLogger("Minecraft"); - + /** Mekanism proxy instance */ @SidedProxy(clientSide = "mekanism.client.ClientProxy", serverSide = "mekanism.common.CommonProxy") public static CommonProxy proxy; - + /** Mekanism debug mode */ public static boolean debug = false; - - /** Mekanism mod instance */ + + /** Mekanism mod instance */ @Instance("Mekanism") - public static Mekanism instance; - - /** Mekanism hooks instance */ - public static MekanismHooks hooks = new MekanismHooks(); - - /** Mekanism configuration instance */ - public static Configuration configuration; - + public static Mekanism instance; + + /** Mekanism hooks instance */ + public static MekanismHooks hooks = new MekanismHooks(); + + /** Mekanism configuration instance */ + public static Configuration configuration; + /** Mekanism version number */ public static Version versionNumber = new Version(5, 6, 0); - + /** Map of Teleporters */ public static Map> teleporters = new HashMap>(); - + /** A map containing references to all dynamic tank inventory caches. */ public static Map dynamicInventories = new HashMap(); - + /** Mekanism creative tab */ public static CreativeTabMekanism tabMekanism = new CreativeTabMekanism(); - + /** List of Mekanism modules loaded */ public static List modulesLoaded = new ArrayList(); - + /** The latest version number which is received from the Mekanism server */ public static String latestVersionNumber; - + /** The recent news which is received from the Mekanism server */ public static String recentNews; - + /** The VoiceServer manager for walkie talkies */ public static VoiceServerManager voiceManager; - + /** A list of the usernames of players who have donated to Mekanism. */ public static List donators = new ArrayList(); - + public static Set ic2Registered = new HashSet(); - - // Block IDs - public static int basicBlockID; - public static int machineBlockID; - public static int machineBlock2ID; - public static int oreBlockID; + + //Block IDs + public static int basicBlockID; + public static int machineBlockID; + public static int machineBlock2ID; + public static int oreBlockID; public static int obsidianTNTID; public static int energyCubeID; public static int boundingBlockID; public static int gasTankID; public static int transmitterID; - - // Items + + //Items public static ItemElectricBow ElectricBow; public static Item EnrichedAlloy; public static ItemEnergized EnergyTablet; @@ -207,8 +206,8 @@ public class Mekanism public static Item ManganeseAlloy; public static Item WalkieTalkie; public static Item ItemProxy; - - // Blocks + + //Blocks public static Block BasicBlock; public static Block MachineBlock; public static Block MachineBlock2; @@ -218,14 +217,14 @@ public class Mekanism public static Block BoundingBlock; public static Block GasTank; public static Block Transmitter; - - // Multi-ID Items + + //Multi-ID Items public static Item Dust; public static Item Ingot; public static Item Clump; public static Item DirtyDust; - - // General Configuration + + //General Configuration public static boolean osmiumGenerationEnabled = true; public static boolean disableBCBronzeCrafting = true; public static boolean disableBCSteelCrafting = true; @@ -237,9 +236,9 @@ public class Mekanism public static boolean forceBuildcraft = false; public static int obsidianTNTBlastRadius = 12; public static int obsidianTNTDelay = 100; - public static int UPDATE_DELAY = 10; + public static int UPDATE_DELAY = 10; public static double ENERGY_PER_REDSTONE = 10000; - + public static double TO_IC2; public static double TO_BC; public static double TO_TE; @@ -248,8 +247,8 @@ public class Mekanism public static double FROM_BC; public static double FROM_TE; public static double FROM_UE = 1000; - - // Usage Configuration + + //Usage Configuration public static double enrichmentChamberUsage; public static double osmiumCompressorUsage; public static double combinerUsage; @@ -260,94 +259,218 @@ public class Mekanism public static double energizedSmelterUsage; public static double digitalMinerUsage; public static double rotaryCondensentratorUsage; - + /** * Adds all in-game crafting and smelting recipes. */ public void addRecipes() { - // Storage Recipes - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 3), new Object[] { "***", "***", "***", Character.valueOf('*'), new ItemStack(Item.coal, 1, 1) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Item.coal, 9), new Object[] { "*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 3) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 2), new Object[] { "***", "***", "***", Character.valueOf('*'), "ingotRefinedObsidian" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Ingot, 9, 0), new Object[] { "*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 2) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 4), new Object[] { "***", "***", "***", Character.valueOf('*'), "ingotRefinedGlowstone" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Ingot, 9, 3), new Object[] { "*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 4) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 0), new Object[] { "XXX", "XXX", "XXX", Character.valueOf('X'), "ingotOsmium" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Ingot, 9, 1), new Object[] { "*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 0) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 1), new Object[] { "***", "***", "***", Character.valueOf('*'), "ingotBronze" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Ingot, 9, 2), new Object[] { "*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 1) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 5), new Object[] { "***", "***", "***", Character.valueOf('*'), "ingotSteel" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Ingot, 9, 4), new Object[] { "*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 5) })); - - // Base Recipes - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ObsidianTNT, 1), new Object[] { "***", "XXX", "***", Character.valueOf('*'), Block.obsidian, Character.valueOf('X'), Block.tnt })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(ElectricBow.getUnchargedItem(), new Object[] { " AB", "E B", " AB", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('B'), Item.silk, Character.valueOf('E'), EnergyTablet.getUnchargedItem() })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(EnergyTablet.getUnchargedItem(), new Object[] { "RCR", "ECE", "RCR", Character.valueOf('C'), Item.ingotGold, Character.valueOf('R'), Item.redstone, Character.valueOf('E'), EnrichedAlloy })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 0), new Object[] { "ARA", "CIC", "ARA", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('R'), Item.redstone, Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8), Character.valueOf('C'), ControlCircuit })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 1), new Object[] { "RCR", "GIG", "RCR", Character.valueOf('R'), Item.redstone, Character.valueOf('C'), "circuitBasic", Character.valueOf('G'), Block.glass, Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 2), new Object[] { "SCS", "RIR", "SCS", Character.valueOf('S'), Block.cobblestone, Character.valueOf('C'), "circuitBasic", Character.valueOf('R'), Item.redstone, Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 3), new Object[] { "RLR", "CIC", "RLR", Character.valueOf('R'), Item.redstone, Character.valueOf('L'), Item.bucketLava, Character.valueOf('C'), "circuitBasic", Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(SpeedUpgrade), new Object[] { " G ", "APA", " G ", Character.valueOf('P'), "dustOsmium", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('G'), Block.glass })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(EnergyUpgrade), new Object[] { " G ", "ADA", " G ", Character.valueOf('G'), Block.glass, Character.valueOf('A'), EnrichedAlloy, Character.valueOf('D'), "dustGold" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(AtomicCore), new Object[] { "AOA", "PDP", "AOA", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('O'), "dustObsidian", Character.valueOf('P'), "dustOsmium", Character.valueOf('D'), Item.diamond })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(AtomicDisassembler.getUnchargedItem(), new Object[] { "AEA", "ACA", " O ", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('E'), EnergyTablet.getUnchargedItem(), Character.valueOf('C'), AtomicCore, Character.valueOf('O'), "ingotRefinedObsidian" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getEmptyGasTank(), new Object[] { "PPP", "PDP", "PPP", Character.valueOf('P'), "ingotOsmium", Character.valueOf('D'), "dustIron" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC), new Object[] { "RLR", "TIT", "RLR", Character.valueOf('R'), Item.redstone, Character.valueOf('L'), new ItemStack(Item.dyePowder, 1, 4), Character.valueOf('T'), EnergyTablet.getUnchargedItem(), Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.ADVANCED), new Object[] { "EGE", "TBT", "EGE", Character.valueOf('E'), EnrichedAlloy, Character.valueOf('G'), Item.ingotGold, Character.valueOf('T'), EnergyTablet.getUnchargedItem(), Character.valueOf('B'), MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.ELITE), new Object[] { "CDC", "TAT", "CDC", Character.valueOf('C'), "circuitBasic", Character.valueOf('D'), Item.diamond, Character.valueOf('T'), EnergyTablet.getUnchargedItem(), Character.valueOf('A'), MekanismUtils.getEnergyCube(EnergyCubeTier.ADVANCED) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.ULTIMATE), new Object[] { "COC", "TAT", "COC", Character.valueOf('C'), AtomicCore, Character.valueOf('O'), "ingotRefinedObsidian", Character.valueOf('T'), EnergyTablet.getUnchargedItem(), Character.valueOf('A'), MekanismUtils.getEnergyCube(EnergyCubeTier.ELITE) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ControlCircuit), new Object[] { "RER", Character.valueOf('R'), Item.redstone, Character.valueOf('E'), EnrichedAlloy })); - CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(EnrichedIron, 2), new Object[] { ManganeseAlloy, Item.ingotIron })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 8), new Object[] { "IFI", "CEC", "IFI", Character.valueOf('I'), Item.ingotIron, Character.valueOf('F'), Block.furnaceIdle, Character.valueOf('C'), "circuitBasic", Character.valueOf('E'), EnrichedAlloy })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(TeleportationCore), new Object[] { "LAL", "GDG", "LAL", Character.valueOf('L'), new ItemStack(Item.dyePowder, 1, 4), Character.valueOf('A'), AtomicCore, Character.valueOf('G'), Item.ingotGold, Character.valueOf('D'), Item.diamond })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(PortableTeleporter), new Object[] { " E ", "CTC", " E ", Character.valueOf('E'), EnergyTablet.getUnchargedItem(), Character.valueOf('C'), "circuitBasic", Character.valueOf('T'), TeleportationCore })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 11), new Object[] { "COC", "OTO", "COC", Character.valueOf('C'), "circuitBasic", Character.valueOf('O'), new ItemStack(BasicBlock, 1, 8), Character.valueOf('T'), TeleportationCore })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 9), new Object[] { "CAC", "ERE", "CAC", Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), AtomicCore, Character.valueOf('E'), EnrichedAlloy, Character.valueOf('R'), new ItemStack(BasicBlock, 1, 8) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Configurator), new Object[] { " L ", "AEA", " S ", Character.valueOf('L'), new ItemStack(Item.dyePowder, 1, 4), Character.valueOf('A'), EnrichedAlloy, Character.valueOf('E'), EnergyTablet.getUnchargedItem(), Character.valueOf('S'), Item.stick })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 9, 7), new Object[] { "OOO", "OGO", "OOO", Character.valueOf('O'), "ingotRefinedObsidian", Character.valueOf('G'), "ingotRefinedGlowstone" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Transmitter, 8, 0), new Object[] { "SGS", Character.valueOf('S'), "ingotSteel", Character.valueOf('G'), Block.glass })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 8), new Object[] { " S ", "SPS", " S ", Character.valueOf('S'), "ingotSteel", Character.valueOf('P'), "ingotOsmium" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 10), new Object[] { "SCS", "GIG", "SCS", Character.valueOf('S'), Block.cobblestone, Character.valueOf('C'), ControlCircuit, Character.valueOf('G'), Block.glass, Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Transmitter, 8, 1), new Object[] { "SRS", Character.valueOf('S'), "ingotSteel", Character.valueOf('R'), Item.redstone })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 12), new Object[] { " B ", "ECE", "OOO", Character.valueOf('B'), Item.bucketEmpty, Character.valueOf('E'), EnrichedAlloy, Character.valueOf('C'), new ItemStack(BasicBlock, 1, 8), Character.valueOf('O'), "ingotOsmium" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 13), new Object[] { "SGS", "CcC", "SSS", Character.valueOf('S'), "ingotSteel", Character.valueOf('G'), Block.glass, Character.valueOf('C'), Block.chest, Character.valueOf('c'), ControlCircuit })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Transmitter, 8, 2), new Object[] { "SBS", Character.valueOf('S'), "ingotSteel", Character.valueOf('B'), Item.bucketEmpty })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 8, 9), new Object[] { " I ", "ISI", " I ", Character.valueOf('I'), "ingotSteel", Character.valueOf('S'), Block.cobblestone })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 8, 10), new Object[] { " I ", "IGI", " I ", Character.valueOf('I'), "ingotSteel", Character.valueOf('G'), Block.glass })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 2, 11), new Object[] { " I ", "ICI", " I ", Character.valueOf('I'), "ingotSteel", Character.valueOf('C'), ControlCircuit })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 14), new Object[] { "PPP", "SES", Character.valueOf('P'), Block.pressurePlateStone, Character.valueOf('S'), "ingotSteel", Character.valueOf('E'), EnergyTablet.getUnchargedItem() })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(Robit.getUnchargedItem(), new Object[] { " S ", "ECE", "OIO", Character.valueOf('S'), "ingotSteel", Character.valueOf('E'), EnergyTablet.getUnchargedItem(), Character.valueOf('C'), AtomicCore, Character.valueOf('O'), "ingotRefinedObsidian", Character.valueOf('I'), new ItemStack(MachineBlock, 1, 13) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(NetworkReader), new Object[] { " G ", "AEA", " I ", Character.valueOf('G'), Block.glass, Character.valueOf('A'), EnrichedAlloy, Character.valueOf('E'), EnergyTablet.getUnchargedItem(), Character.valueOf('I'), "ingotSteel" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(WalkieTalkie), new Object[] { " O", "SCS", " S ", Character.valueOf('O'), "ingotOsmium", Character.valueOf('S'), "ingotSteel", Character.valueOf('C'), "circuitBasic" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Transmitter, 8, 3), new Object[] { "SCS", Character.valueOf('S'), "ingotSteel", Character.valueOf('C'), "circuitBasic" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 15), new Object[] { "IPI", "ICI", "III", Character.valueOf('I'), Item.ingotIron, Character.valueOf('P'), Block.pistonBase, Character.valueOf('C'), "circuitBasic" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Transmitter, 8, 4), new Object[] { "SBS", Character.valueOf('S'), "ingotSteel", Character.valueOf('B'), Block.fenceIron })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 6), new Object[] { "SSS", "SCS", "SSS", Character.valueOf('S'), Block.cobblestone, Character.valueOf('C'), "circuitBasic" })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 4), new Object[] { "ACA", "SES", "TIT", Character.valueOf('A'), AtomicCore, Character.valueOf('C'), "circuitBasic", Character.valueOf('S'), new ItemStack(MachineBlock, 1, 15), Character.valueOf('E'), Robit.getUnchargedItem(), Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8), Character.valueOf('T'), TeleportationCore })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Transmitter, 1, 5), new Object[] { "RRR", "SBS", "RRR", Character.valueOf('R'), Item.redstone, Character.valueOf('S'), "ingotSteel", Character.valueOf('B'), Block.fenceIron })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock2, 1, 0), new Object[] { "GCG", "tET", "GIG", Character.valueOf('G'), Block.glass, Character.valueOf('C'), "circuitBasic", Character.valueOf('t'), MekanismUtils.getEmptyGasTank(), Character.valueOf('E'), EnergyTablet.getUnchargedItem(), Character.valueOf('T'), new ItemStack(BasicBlock, 1, 9), Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8) })); - - for (RecipeType type : RecipeType.values()) + //Storage Recipes + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 3), new Object[] { + "***", "***", "***", Character.valueOf('*'), new ItemStack(Item.coal, 1, 1) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Item.coal, 9), new Object[] { + "*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 3) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 2), new Object[] { + "***", "***", "***", Character.valueOf('*'), "ingotRefinedObsidian" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Ingot, 9, 0), new Object[] { + "*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 2) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 4), new Object[] { + "***", "***", "***", Character.valueOf('*'), "ingotRefinedGlowstone" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Ingot, 9, 3), new Object[] { + "*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 4) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 0), new Object[] { + "XXX", "XXX", "XXX", Character.valueOf('X'), "ingotOsmium" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Ingot, 9, 1), new Object[] { + "*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 0) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 1), new Object[] { + "***", "***", "***", Character.valueOf('*'), "ingotBronze" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Ingot, 9, 2), new Object[] { + "*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 1) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 5), new Object[] { + "***", "***", "***", Character.valueOf('*'), "ingotSteel" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Ingot, 9, 4), new Object[] { + "*", Character.valueOf('*'), new ItemStack(BasicBlock, 1, 5) + })); + + //Base Recipes + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ObsidianTNT, 1), new Object[] { + "***", "XXX", "***", Character.valueOf('*'), Block.obsidian, Character.valueOf('X'), Block.tnt + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(ElectricBow.getUnchargedItem(), new Object[] { + " AB", "E B", " AB", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('B'), Item.silk, Character.valueOf('E'), EnergyTablet.getUnchargedItem() + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(EnergyTablet.getUnchargedItem(), new Object[] { + "RCR", "ECE", "RCR", Character.valueOf('C'), Item.ingotGold, Character.valueOf('R'), Item.redstone, Character.valueOf('E'), EnrichedAlloy + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 0), new Object[] { + "ARA", "CIC", "ARA", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('R'), Item.redstone, Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8), Character.valueOf('C'), ControlCircuit + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 1), new Object[] { + "RCR", "GIG", "RCR", Character.valueOf('R'), Item.redstone, Character.valueOf('C'), "circuitBasic", Character.valueOf('G'), Block.glass, Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 2), new Object[] { + "SCS", "RIR", "SCS", Character.valueOf('S'), Block.cobblestone, Character.valueOf('C'), "circuitBasic", Character.valueOf('R'), Item.redstone, Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 3), new Object[] { + "RLR", "CIC", "RLR", Character.valueOf('R'), Item.redstone, Character.valueOf('L'), Item.bucketLava, Character.valueOf('C'), "circuitBasic", Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(SpeedUpgrade), new Object[] { + " G ", "APA", " G ", Character.valueOf('P'), "dustOsmium", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('G'), Block.glass + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(EnergyUpgrade), new Object[] { + " G ", "ADA", " G ", Character.valueOf('G'), Block.glass, Character.valueOf('A'), EnrichedAlloy, Character.valueOf('D'), "dustGold" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(AtomicCore), new Object[] { + "AOA", "PDP", "AOA", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('O'), "dustObsidian", Character.valueOf('P'), "dustOsmium", Character.valueOf('D'), Item.diamond + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(AtomicDisassembler.getUnchargedItem(), new Object[] { + "AEA", "ACA", " O ", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('E'), EnergyTablet.getUnchargedItem(), Character.valueOf('C'), AtomicCore, Character.valueOf('O'), "ingotRefinedObsidian" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getEmptyGasTank(), new Object[] { + "PPP", "PDP", "PPP", Character.valueOf('P'), "ingotOsmium", Character.valueOf('D'), "dustIron" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC), new Object[] { + "RLR", "TIT", "RLR", Character.valueOf('R'), Item.redstone, Character.valueOf('L'), new ItemStack(Item.dyePowder, 1, 4), Character.valueOf('T'), EnergyTablet.getUnchargedItem(), Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.ADVANCED), new Object[] { + "EGE", "TBT", "EGE", Character.valueOf('E'), EnrichedAlloy, Character.valueOf('G'), Item.ingotGold, Character.valueOf('T'), EnergyTablet.getUnchargedItem(), Character.valueOf('B'), MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.ELITE), new Object[] { + "CDC", "TAT", "CDC", Character.valueOf('C'), "circuitBasic", Character.valueOf('D'), Item.diamond, Character.valueOf('T'), EnergyTablet.getUnchargedItem(), Character.valueOf('A'), MekanismUtils.getEnergyCube(EnergyCubeTier.ADVANCED) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.ULTIMATE), new Object[] { + "COC", "TAT", "COC", Character.valueOf('C'), AtomicCore, Character.valueOf('O'), "ingotRefinedObsidian", Character.valueOf('T'), EnergyTablet.getUnchargedItem(), Character.valueOf('A'), MekanismUtils.getEnergyCube(EnergyCubeTier.ELITE) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(ControlCircuit), new Object[] { + "RER", Character.valueOf('R'), Item.redstone, Character.valueOf('E'), EnrichedAlloy + })); + CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(EnrichedIron, 2), new Object[] { + ManganeseAlloy, Item.ingotIron + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 8), new Object[] { + "IFI", "CEC", "IFI", Character.valueOf('I'), Item.ingotIron, Character.valueOf('F'), Block.furnaceIdle, Character.valueOf('C'), "circuitBasic", Character.valueOf('E'), EnrichedAlloy + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(TeleportationCore), new Object[] { + "LAL", "GDG", "LAL", Character.valueOf('L'), new ItemStack(Item.dyePowder, 1, 4), Character.valueOf('A'), AtomicCore, Character.valueOf('G'), Item.ingotGold, Character.valueOf('D'), Item.diamond + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(PortableTeleporter), new Object[] { + " E ", "CTC", " E ", Character.valueOf('E'), EnergyTablet.getUnchargedItem(), Character.valueOf('C'), "circuitBasic", Character.valueOf('T'), TeleportationCore + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 11), new Object[] { + "COC", "OTO", "COC", Character.valueOf('C'), "circuitBasic", Character.valueOf('O'), new ItemStack(BasicBlock, 1, 8), Character.valueOf('T'), TeleportationCore + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 9), new Object[] { + "CAC", "ERE", "CAC", Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), AtomicCore, Character.valueOf('E'), EnrichedAlloy, Character.valueOf('R'), new ItemStack(BasicBlock, 1, 8) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Configurator), new Object[] { + " L ", "AEA", " S ", Character.valueOf('L'), new ItemStack(Item.dyePowder, 1, 4), Character.valueOf('A'), EnrichedAlloy, Character.valueOf('E'), EnergyTablet.getUnchargedItem(), Character.valueOf('S'), Item.stick + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 9, 7), new Object[] { + "OOO", "OGO", "OOO", Character.valueOf('O'), "ingotRefinedObsidian", Character.valueOf('G'), "ingotRefinedGlowstone" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Transmitter, 8, 0), new Object[] { + "SGS", Character.valueOf('S'), "ingotSteel", Character.valueOf('G'), Block.glass + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 8), new Object[] { + " S ", "SPS", " S ", Character.valueOf('S'), "ingotSteel", Character.valueOf('P'), "ingotOsmium" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 10), new Object[] { + "SCS", "GIG", "SCS", Character.valueOf('S'), Block.cobblestone, Character.valueOf('C'), ControlCircuit, Character.valueOf('G'), Block.glass, Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Transmitter, 8, 1), new Object[] { + "SRS", Character.valueOf('S'), "ingotSteel", Character.valueOf('R'), Item.redstone + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 12), new Object[] { + " B ", "ECE", "OOO", Character.valueOf('B'), Item.bucketEmpty, Character.valueOf('E'), EnrichedAlloy, Character.valueOf('C'), new ItemStack(BasicBlock, 1, 8), Character.valueOf('O'), "ingotOsmium" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 13), new Object[] { + "SGS", "CcC", "SSS", Character.valueOf('S'), "ingotSteel", Character.valueOf('G'), Block.glass, Character.valueOf('C'), Block.chest, Character.valueOf('c'), ControlCircuit + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Transmitter, 8, 2), new Object[] { + "SBS", Character.valueOf('S'), "ingotSteel", Character.valueOf('B'), Item.bucketEmpty + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 8, 9), new Object[] { + " I ", "ISI", " I ", Character.valueOf('I'), "ingotSteel", Character.valueOf('S'), Block.cobblestone + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 8, 10), new Object[] { + " I ", "IGI", " I ", Character.valueOf('I'), "ingotSteel", Character.valueOf('G'), Block.glass + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 2, 11), new Object[] { + " I ", "ICI", " I ", Character.valueOf('I'), "ingotSteel", Character.valueOf('C'), ControlCircuit + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 14), new Object[] { + "PPP", "SES", Character.valueOf('P'), Block.pressurePlateStone, Character.valueOf('S'), "ingotSteel", Character.valueOf('E'), EnergyTablet.getUnchargedItem() + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(Robit.getUnchargedItem(), new Object[] { + " S ", "ECE", "OIO", Character.valueOf('S'), "ingotSteel", Character.valueOf('E'), EnergyTablet.getUnchargedItem(), Character.valueOf('C'), AtomicCore, Character.valueOf('O'), "ingotRefinedObsidian", Character.valueOf('I'), new ItemStack(MachineBlock, 1, 13) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(NetworkReader), new Object[] { + " G ", "AEA", " I ", Character.valueOf('G'), Block.glass, Character.valueOf('A'), EnrichedAlloy, Character.valueOf('E'), EnergyTablet.getUnchargedItem(), Character.valueOf('I'), "ingotSteel" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(WalkieTalkie), new Object[] { + " O", "SCS", " S ", Character.valueOf('O'), "ingotOsmium", Character.valueOf('S'), "ingotSteel", Character.valueOf('C'), "circuitBasic" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Transmitter, 8, 3), new Object[] { + "SCS", Character.valueOf('S'), "ingotSteel", Character.valueOf('C'), "circuitBasic" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 15), new Object[] { + "IPI", "ICI", "III", Character.valueOf('I'), Item.ingotIron, Character.valueOf('P'), Block.pistonBase, Character.valueOf('C'), "circuitBasic" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Transmitter, 8, 4), new Object[] { + "SBS", Character.valueOf('S'), "ingotSteel", Character.valueOf('B'), Block.fenceIron + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(BasicBlock, 1, 6), new Object[] { + "SSS", "SCS", "SSS", Character.valueOf('S'), Block.cobblestone, Character.valueOf('C'), "circuitBasic" + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock, 1, 4), new Object[] { + "ACA", "SES", "TIT", Character.valueOf('A'), AtomicCore, Character.valueOf('C'), "circuitBasic", Character.valueOf('S'), new ItemStack(MachineBlock, 1, 15), Character.valueOf('E'), Robit.getUnchargedItem(), + Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8), Character.valueOf('T'), TeleportationCore + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(Transmitter, 1, 5), new Object[] { + "RRR", "SBS", "RRR", Character.valueOf('R'), Item.redstone, Character.valueOf('S'), "ingotSteel", Character.valueOf('B'), Block.fenceIron + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(new ItemStack(MachineBlock2, 1, 0), new Object[] { + "GCG", "tET", "GIG", Character.valueOf('G'), Block.glass, Character.valueOf('C'), "circuitBasic", Character.valueOf('t'), MekanismUtils.getEmptyGasTank(), Character.valueOf('E'), EnergyTablet.getUnchargedItem(), + Character.valueOf('T'), new ItemStack(BasicBlock, 1, 9), Character.valueOf('I'), new ItemStack(BasicBlock, 1, 8) + })); + + for(RecipeType type : RecipeType.values()) { - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getFactory(FactoryTier.BASIC, type), new Object[] { "CAC", "GOG", "CAC", Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('G'), "dustGold", Character.valueOf('O'), type.getStack() })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getFactory(FactoryTier.ADVANCED, type), new Object[] { "CAC", "DOD", "CAC", Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('D'), "dustDiamond", Character.valueOf('O'), MekanismUtils.getFactory(FactoryTier.BASIC, type) })); - CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getFactory(FactoryTier.ELITE, type), new Object[] { "CAC", "cOc", "CAC", Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('c'), AtomicCore, Character.valueOf('O'), MekanismUtils.getFactory(FactoryTier.ADVANCED, type) })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getFactory(FactoryTier.BASIC, type), new Object[] { + "CAC", "GOG", "CAC", Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('G'), "dustGold", Character.valueOf('O'), type.getStack() + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getFactory(FactoryTier.ADVANCED, type), new Object[] { + "CAC", "DOD", "CAC", Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('D'), "dustDiamond", Character.valueOf('O'), MekanismUtils.getFactory(FactoryTier.BASIC, type) + })); + CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getFactory(FactoryTier.ELITE, type), new Object[] { + "CAC", "cOc", "CAC", Character.valueOf('C'), "circuitBasic", Character.valueOf('A'), EnrichedAlloy, Character.valueOf('c'), AtomicCore, Character.valueOf('O'), MekanismUtils.getFactory(FactoryTier.ADVANCED, type) + })); } - + CraftingManager.getInstance().getRecipeList().add(new BinRecipe()); - - // Furnace Recipes + + //Furnace Recipes FurnaceRecipes.smelting().addSmelting(oreBlockID, 0, new ItemStack(Ingot, 1, 1), 1.0F); FurnaceRecipes.smelting().addSmelting(Dust.itemID, 2, new ItemStack(Ingot, 1, 1), 1.0F); FurnaceRecipes.smelting().addSmelting(Dust.itemID, 0, new ItemStack(Item.ingotIron), 1.0F); FurnaceRecipes.smelting().addSmelting(Dust.itemID, 1, new ItemStack(Item.ingotGold), 1.0F); FurnaceRecipes.smelting().addSmelting(Dust.itemID, 5, new ItemStack(Ingot, 1, 4), 1.0F); FurnaceRecipes.smelting().addSmelting(EnrichedIron.itemID, 0, new ItemStack(EnrichedAlloy), 1.0F); - - // Enrichment Chamber Recipes + + //Enrichment Chamber Recipes RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.oreRedstone), new ItemStack(Item.redstone, 12)); - RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.obsidian), new ItemStack(DirtyDust, 1, 6)); + RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.obsidian), new ItemStack(DirtyDust, 1, 6)); RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Item.coal, 1, 0), new ItemStack(CompressedCarbon)); RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Item.coal, 1, 1), new ItemStack(CompressedCarbon)); RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.oreLapis), new ItemStack(Item.dyePowder, 12, 4)); @@ -358,57 +481,57 @@ public class Mekanism RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.stoneBrick, 1, 2), new ItemStack(Block.stoneBrick, 1, 0)); RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.stoneBrick, 1, 0), new ItemStack(Block.stoneBrick, 1, 3)); RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.stoneBrick, 1, 1), new ItemStack(Block.stoneBrick, 1, 0)); - - // Combiner recipes + + //Combiner recipes RecipeHandler.addCombinerRecipe(new ItemStack(Item.redstone, 16), new ItemStack(Block.oreRedstone)); RecipeHandler.addCombinerRecipe(new ItemStack(Item.dyePowder, 16, 4), new ItemStack(Block.oreLapis)); - - // Osmium Compressor Recipes + + //Osmium Compressor Recipes RecipeHandler.addOsmiumCompressorRecipe(new ItemStack(Item.glowstone), new ItemStack(Ingot, 1, 3)); - - // Crusher Recipes + + //Crusher Recipes RecipeHandler.addCrusherRecipe(new ItemStack(Item.diamond), new ItemStack(Dust, 1, 4)); - RecipeHandler.addCrusherRecipe(new ItemStack(Item.ingotIron), new ItemStack(Dust, 1, 0)); - RecipeHandler.addCrusherRecipe(new ItemStack(Item.ingotGold), new ItemStack(Dust, 1, 1)); - RecipeHandler.addCrusherRecipe(new ItemStack(Block.gravel), new ItemStack(Item.flint)); - RecipeHandler.addCrusherRecipe(new ItemStack(Block.stone), new ItemStack(Block.cobblestone)); - RecipeHandler.addCrusherRecipe(new ItemStack(Block.cobblestone), new ItemStack(Block.sand)); - RecipeHandler.addCrusherRecipe(new ItemStack(Block.stoneBrick, 1, 2), new ItemStack(Block.stone)); - RecipeHandler.addCrusherRecipe(new ItemStack(Block.stoneBrick, 1, 0), new ItemStack(Block.stoneBrick, 1, 2)); - RecipeHandler.addCrusherRecipe(new ItemStack(Block.stoneBrick, 1, 3), new ItemStack(Block.stoneBrick, 1, 0)); - - // Purification Chamber Recipes - RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.obsidian), new ItemStack(Clump, 2, 6)); - - // Metallurgic Infuser Recipes - RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("CARBON"), 10, new ItemStack(EnrichedIron)), new ItemStack(Dust, 1, 5)); - - if (InfuseRegistry.contains("BIO")) - { - RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("BIO"), 10, new ItemStack(Block.cobblestone)), new ItemStack(Block.cobblestoneMossy)); - RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("BIO"), 10, new ItemStack(Block.stoneBrick, 1, 0)), new ItemStack(Block.stoneBrick, 1, 1)); - } - - // Infuse objects - InfuseRegistry.registerInfuseObject(new ItemStack(Item.coal, 1, 0), new InfuseObject(InfuseRegistry.get("CARBON"), 10)); - InfuseRegistry.registerInfuseObject(new ItemStack(Item.coal, 1, 1), new InfuseObject(InfuseRegistry.get("CARBON"), 20)); - InfuseRegistry.registerInfuseObject(new ItemStack(CompressedCarbon), new InfuseObject(InfuseRegistry.get("CARBON"), 100)); - - // Smelting - FurnaceRecipes.smelting().addSmelting(Block.dirt.blockID, new ItemStack(ManganeseAlloy, 2), 0); + RecipeHandler.addCrusherRecipe(new ItemStack(Item.ingotIron), new ItemStack(Dust, 1, 0)); + RecipeHandler.addCrusherRecipe(new ItemStack(Item.ingotGold), new ItemStack(Dust, 1, 1)); + RecipeHandler.addCrusherRecipe(new ItemStack(Block.gravel), new ItemStack(Item.flint)); + RecipeHandler.addCrusherRecipe(new ItemStack(Block.stone), new ItemStack(Block.cobblestone)); + RecipeHandler.addCrusherRecipe(new ItemStack(Block.cobblestone), new ItemStack(Block.sand)); + RecipeHandler.addCrusherRecipe(new ItemStack(Block.stoneBrick, 1, 2), new ItemStack(Block.stone)); + RecipeHandler.addCrusherRecipe(new ItemStack(Block.stoneBrick, 1, 0), new ItemStack(Block.stoneBrick, 1, 2)); + RecipeHandler.addCrusherRecipe(new ItemStack(Block.stoneBrick, 1, 3), new ItemStack(Block.stoneBrick, 1, 0)); + + //Purification Chamber Recipes + RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.obsidian), new ItemStack(Clump, 2, 6)); + + //Metallurgic Infuser Recipes + RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("CARBON"), 10, new ItemStack(EnrichedIron)), new ItemStack(Dust, 1, 5)); + + if(InfuseRegistry.contains("BIO")) + { + RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("BIO"), 10, new ItemStack(Block.cobblestone)), new ItemStack(Block.cobblestoneMossy)); + RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("BIO"), 10, new ItemStack(Block.stoneBrick, 1, 0)), new ItemStack(Block.stoneBrick, 1, 1)); + } + + //Infuse objects + InfuseRegistry.registerInfuseObject(new ItemStack(Item.coal, 1, 0), new InfuseObject(InfuseRegistry.get("CARBON"), 10)); + InfuseRegistry.registerInfuseObject(new ItemStack(Item.coal, 1, 1), new InfuseObject(InfuseRegistry.get("CARBON"), 20)); + InfuseRegistry.registerInfuseObject(new ItemStack(CompressedCarbon), new InfuseObject(InfuseRegistry.get("CARBON"), 100)); + + //Smelting + FurnaceRecipes.smelting().addSmelting(Block.dirt.blockID, new ItemStack(ManganeseAlloy, 2), 0); } - + /** * Adds and registers all items. */ public void addItems() - { - // Declarations + { + //Declarations configuration.load(); ElectricBow = (ItemElectricBow) new ItemElectricBow(configuration.getItem("ElectricBow", 11200).getInt()).setUnlocalizedName("ElectricBow"); - // OPEN 11201-11203 - Dust = new ItemDust(configuration.getItem("Dust", 11204).getInt() - 256); - Ingot = new ItemIngot(configuration.getItem("Ingot", 11205).getInt() - 256); + //OPEN 11201-11203 + Dust = new ItemDust(configuration.getItem("Dust", 11204).getInt()-256); + Ingot = new ItemIngot(configuration.getItem("Ingot", 11205).getInt()-256); EnergyTablet = (ItemEnergized) new ItemEnergized(configuration.getItem("EnergyTablet", 11206).getInt(), 1000000, 120).setUnlocalizedName("EnergyTablet"); SpeedUpgrade = new ItemMachineUpgrade(configuration.getItem("SpeedUpgrade", 11207).getInt()).setUnlocalizedName("SpeedUpgrade"); EnergyUpgrade = new ItemMachineUpgrade(configuration.getItem("EnergyUpgrade", 11208).getInt()).setUnlocalizedName("EnergyUpgrade"); @@ -422,15 +545,15 @@ public class Mekanism CompressedCarbon = new ItemMekanism(configuration.getItem("CompressedCarbon", 11216).getInt()).setUnlocalizedName("CompressedCarbon"); PortableTeleporter = new ItemPortableTeleporter(configuration.getItem("PortableTeleporter", 11217).getInt()).setUnlocalizedName("PortableTeleporter"); TeleportationCore = new ItemMekanism(configuration.getItem("TeleportationCore", 11218).getInt()).setUnlocalizedName("TeleportationCore"); - Clump = new ItemClump(configuration.getItem("Clump", 11219).getInt() - 256); - DirtyDust = new ItemDirtyDust(configuration.getItem("DirtyDust", 11220).getInt() - 256); + Clump = new ItemClump(configuration.getItem("Clump", 11219).getInt()-256); + DirtyDust = new ItemDirtyDust(configuration.getItem("DirtyDust", 11220).getInt()-256); Configurator = new ItemConfigurator(configuration.getItem("Configurator", 11221).getInt()).setUnlocalizedName("Configurator"); NetworkReader = new ItemNetworkReader(configuration.getItem("NetworkReader", 11222).getInt()).setUnlocalizedName("NetworkReader"); ManganeseAlloy = new ItemMekanism(configuration.getItem("ManganeseAlloy", 11223).getInt()).setUnlocalizedName("ManganeseAlloy"); WalkieTalkie = new ItemWalkieTalkie(configuration.getItem("WalkieTalkie", 11224).getInt()).setUnlocalizedName("WalkieTalkie"); configuration.save(); - - // Registrations + + //Registrations GameRegistry.registerItem(ElectricBow, "ElectricBow"); GameRegistry.registerItem(Dust, "Dust"); GameRegistry.registerItem(Ingot, "Ingot"); @@ -454,13 +577,13 @@ public class Mekanism GameRegistry.registerItem(ManganeseAlloy, "MaganeseAlloy"); GameRegistry.registerItem(WalkieTalkie, "WalkieTalkie"); } - + /** * Adds and registers all blocks. */ public void addBlocks() { - // Declarations + //Declarations BasicBlock = new BlockBasic(basicBlockID).setUnlocalizedName("BasicBlock"); MachineBlock = new BlockMachine(machineBlockID).setUnlocalizedName("MachineBlock"); MachineBlock2 = new BlockMachine(machineBlock2ID).setUnlocalizedName("MachineBlock2"); @@ -470,12 +593,12 @@ public class Mekanism BoundingBlock = (BlockBounding) new BlockBounding(boundingBlockID).setUnlocalizedName("BoundingBlock"); GasTank = new BlockGasTank(gasTankID).setUnlocalizedName("GasTank"); Transmitter = new BlockTransmitter(transmitterID).setUnlocalizedName("Transmitter"); - - // Registrations + + //Registrations GameRegistry.registerBlock(ObsidianTNT, "ObsidianTNT"); GameRegistry.registerBlock(BoundingBlock, "BoundingBlock"); - - // Add block items into itemsList for blocks with common IDs. + + //Add block items into itemsList for blocks with common IDs. Item.itemsList[basicBlockID] = new ItemBlockBasic(basicBlockID - 256, BasicBlock).setUnlocalizedName("BasicBlock"); Item.itemsList[machineBlockID] = new ItemBlockMachine(machineBlockID - 256, MachineBlock).setUnlocalizedName("MachineBlock"); Item.itemsList[machineBlock2ID] = new ItemBlockMachine(machineBlock2ID - 256, MachineBlock2).setUnlocalizedName("MachineBlock2"); @@ -484,17 +607,16 @@ public class Mekanism Item.itemsList[gasTankID] = new ItemBlockGasTank(gasTankID - 256, GasTank).setUnlocalizedName("GasTank"); Item.itemsList[transmitterID] = new ItemBlockTransmitter(transmitterID - 256, Transmitter).setUnlocalizedName("Transmitter"); } - + /** - * Integrates the mod with other mods -- registering items and blocks with the Forge Ore - * Dictionary and adding machine recipes with other items' corresponding resources. + * Integrates the mod with other mods -- registering items and blocks with the Forge Ore Dictionary + * and adding machine recipes with other items' corresponding resources. */ public void addIntegratedItems() { - // Add specific items to ore dictionary for recipe usage in other mods. @Calclavia + //Add specific items to ore dictionary for recipe usage in other mods. @Calclavia OreDictionary.registerOre("universalCable", new ItemStack(Transmitter, 8, 1)); - OreDictionary.registerOre("battery", EnergyTablet.getUnchargedItem()); - + OreDictionary.registerOre("dustIron", new ItemStack(Dust, 1, 0)); OreDictionary.registerOre("dustGold", new ItemStack(Dust, 1, 1)); OreDictionary.registerOre("dustOsmium", new ItemStack(Dust, 1, 2)); @@ -504,20 +626,20 @@ public class Mekanism OreDictionary.registerOre("dustCopper", new ItemStack(Dust, 1, 6)); OreDictionary.registerOre("dustTin", new ItemStack(Dust, 1, 7)); OreDictionary.registerOre("dustSilver", new ItemStack(Dust, 1, 8)); - + OreDictionary.registerOre("ingotRefinedObsidian", new ItemStack(Ingot, 1, 0)); OreDictionary.registerOre("ingotOsmium", new ItemStack(Ingot, 1, 1)); OreDictionary.registerOre("ingotBronze", new ItemStack(Ingot, 1, 2)); OreDictionary.registerOre("ingotRefinedGlowstone", new ItemStack(Ingot, 1, 3)); OreDictionary.registerOre("ingotSteel", new ItemStack(Ingot, 1, 4)); - + OreDictionary.registerOre("blockOsmium", new ItemStack(BasicBlock, 1, 0)); OreDictionary.registerOre("blockBronze", new ItemStack(BasicBlock, 1, 1)); OreDictionary.registerOre("blockRefinedObsidian", new ItemStack(BasicBlock, 1, 2)); OreDictionary.registerOre("blockCoal", new ItemStack(BasicBlock, 1, 3)); OreDictionary.registerOre("blockRefinedGlowstone", new ItemStack(BasicBlock, 1, 4)); OreDictionary.registerOre("blockSteel", new ItemStack(BasicBlock, 1, 5)); - + OreDictionary.registerOre("dustDirtyIron", new ItemStack(DirtyDust, 1, 0)); OreDictionary.registerOre("dustDirtyGold", new ItemStack(DirtyDust, 1, 1)); OreDictionary.registerOre("dustDirtyOsmium", new ItemStack(DirtyDust, 1, 2)); @@ -525,10 +647,10 @@ public class Mekanism OreDictionary.registerOre("dustDirtyTin", new ItemStack(DirtyDust, 1, 4)); OreDictionary.registerOre("dustDirtySilver", new ItemStack(DirtyDust, 1, 5)); OreDictionary.registerOre("dustDirtyObsidian", new ItemStack(DirtyDust, 1, 6)); - - // for RailCraft/IC2. + + //for RailCraft/IC2. OreDictionary.registerOre("dustObsidian", new ItemStack(DirtyDust, 1, 6)); - + OreDictionary.registerOre("clumpIron", new ItemStack(Clump, 1, 0)); OreDictionary.registerOre("clumpGold", new ItemStack(Clump, 1, 1)); OreDictionary.registerOre("clumpOsmium", new ItemStack(Clump, 1, 2)); @@ -536,559 +658,487 @@ public class Mekanism OreDictionary.registerOre("clumpTin", new ItemStack(Clump, 1, 4)); OreDictionary.registerOre("clumpSilver", new ItemStack(Clump, 1, 5)); OreDictionary.registerOre("clumpObsidian", new ItemStack(Clump, 1, 6)); - + OreDictionary.registerOre("oreOsmium", new ItemStack(OreBlock, 1, 0)); - - try - { + + try { CraftingManagers.pulverizerManager.addRecipe(400, new ItemStack(OreBlock, 1, 0), new ItemStack(Dust, 2, 2), false); - + CraftingManagers.pulverizerManager.addRecipe(40, new ItemStack(Mekanism.Ingot, 1, 1), new ItemStack(Mekanism.Dust, 1, 2), false); CraftingManagers.pulverizerManager.addRecipe(40, new ItemStack(Mekanism.Ingot, 1, 0), new ItemStack(Mekanism.Dust, 1, 3), false); CraftingManagers.pulverizerManager.addRecipe(40, new ItemStack(Mekanism.Ingot, 1, 3), new ItemStack(Item.glowstone), false); CraftingManagers.pulverizerManager.addRecipe(40, new ItemStack(Mekanism.Ingot, 1, 4), new ItemStack(Mekanism.Dust, 1, 5), false); - + CraftingManagers.pulverizerManager.addRecipe(80, new ItemStack(Clump, 1, 0), new ItemStack(DirtyDust, 1, 0), false); CraftingManagers.pulverizerManager.addRecipe(80, new ItemStack(Clump, 1, 1), new ItemStack(DirtyDust, 1, 1), false); CraftingManagers.pulverizerManager.addRecipe(80, new ItemStack(Clump, 1, 2), new ItemStack(DirtyDust, 1, 2), false); CraftingManagers.pulverizerManager.addRecipe(80, new ItemStack(Clump, 1, 3), new ItemStack(DirtyDust, 1, 3), false); CraftingManagers.pulverizerManager.addRecipe(80, new ItemStack(Clump, 1, 4), new ItemStack(DirtyDust, 1, 4), false); CraftingManagers.pulverizerManager.addRecipe(80, new ItemStack(Clump, 1, 5), new ItemStack(DirtyDust, 1, 5), false); - + System.out.println("[Mekanism] Hooked into Thermal Expansion successfully."); - } - catch (Exception e) - { - } - - if (controlCircuitOreDict || !hooks.BasicComponentsLoaded) + } catch(Exception e) {} + + if(controlCircuitOreDict || !hooks.BasicComponentsLoaded) { OreDictionary.registerOre("circuitBasic", new ItemStack(ControlCircuit)); } - + OreDictionary.registerOre("itemCompressedCarbon", new ItemStack(CompressedCarbon)); OreDictionary.registerOre("itemEnrichedAlloy", new ItemStack(EnrichedAlloy)); - - for (ItemStack ore : OreDictionary.getOres("dustRefinedObsidian")) + + for(ItemStack ore : OreDictionary.getOres("dustRefinedObsidian")) { RecipeHandler.addOsmiumCompressorRecipe(MekanismUtils.size(ore, 1), new ItemStack(Ingot, 1, 0)); RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(DirtyDust, 1, 6)); } - - for (ItemStack ore : OreDictionary.getOres("clumpIron")) + + for(ItemStack ore : OreDictionary.getOres("clumpIron")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(DirtyDust, 1, 0)); } - - for (ItemStack ore : OreDictionary.getOres("clumpGold")) + + for(ItemStack ore : OreDictionary.getOres("clumpGold")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(DirtyDust, 1, 1)); } - - for (ItemStack ore : OreDictionary.getOres("clumpOsmium")) + + for(ItemStack ore : OreDictionary.getOres("clumpOsmium")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(DirtyDust, 1, 2)); } - - for (ItemStack ore : OreDictionary.getOres("clumpCopper")) + + for(ItemStack ore : OreDictionary.getOres("clumpCopper")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(DirtyDust, 1, 3)); } - - for (ItemStack ore : OreDictionary.getOres("clumpTin")) + + for(ItemStack ore : OreDictionary.getOres("clumpTin")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(DirtyDust, 1, 4)); } - - for (ItemStack ore : OreDictionary.getOres("clumpSilver")) + + for(ItemStack ore : OreDictionary.getOres("clumpSilver")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(DirtyDust, 1, 5)); } - - for (ItemStack ore : OreDictionary.getOres("clumpObsidian")) + + for(ItemStack ore : OreDictionary.getOres("clumpObsidian")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(DirtyDust, 1, 6)); } - - for (ItemStack ore : OreDictionary.getOres("dustDirtyIron")) + + for(ItemStack ore : OreDictionary.getOres("dustDirtyIron")) { RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 1, 0)); } - - for (ItemStack ore : OreDictionary.getOres("dustDirtyGold")) + + for(ItemStack ore : OreDictionary.getOres("dustDirtyGold")) { RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 1, 1)); } - - for (ItemStack ore : OreDictionary.getOres("dustDirtyOsmium")) + + for(ItemStack ore : OreDictionary.getOres("dustDirtyOsmium")) { RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 1, 2)); } - - for (ItemStack ore : OreDictionary.getOres("dustDirtyCopper")) + + for(ItemStack ore : OreDictionary.getOres("dustDirtyCopper")) { RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 1, 6)); } - - for (ItemStack ore : OreDictionary.getOres("dustDirtyTin")) + + for(ItemStack ore : OreDictionary.getOres("dustDirtyTin")) { RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 1, 7)); } - - for (ItemStack ore : OreDictionary.getOres("dustDirtySilver")) + + for(ItemStack ore : OreDictionary.getOres("dustDirtySilver")) { RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 1, 8)); } - - for (ItemStack ore : OreDictionary.getOres("oreCopper")) + + for(ItemStack ore : OreDictionary.getOres("oreCopper")) { RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 2, 6)); RecipeHandler.addPurificationChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Clump, 3, 3)); } - - for (ItemStack ore : OreDictionary.getOres("oreTin")) + + for(ItemStack ore : OreDictionary.getOres("oreTin")) { RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 2, 7)); RecipeHandler.addPurificationChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Clump, 3, 4)); } - - for (ItemStack ore : OreDictionary.getOres("oreOsmium")) + + for(ItemStack ore : OreDictionary.getOres("oreOsmium")) { RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 2, 2)); RecipeHandler.addPurificationChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Clump, 3, 2)); } - - for (ItemStack ore : OreDictionary.getOres("oreIron")) + + for(ItemStack ore : OreDictionary.getOres("oreIron")) { RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.oreIron), new ItemStack(Dust, 2, 0)); - RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.oreIron), new ItemStack(Clump, 3, 0)); + RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.oreIron), new ItemStack(Clump, 3, 0)); } - - for (ItemStack ore : OreDictionary.getOres("oreGold")) + + for(ItemStack ore : OreDictionary.getOres("oreGold")) { RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Block.oreGold), new ItemStack(Dust, 2, 1)); - RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.oreGold), new ItemStack(Clump, 3, 1)); + RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.oreGold), new ItemStack(Clump, 3, 1)); } - - try - { - for (ItemStack ore : OreDictionary.getOres("oreLead")) + + try { + for(ItemStack ore : OreDictionary.getOres("oreLead")) { RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), MekanismUtils.size(OreDictionary.getOres("dustLead").get(0), 2)); } - - for (ItemStack ore : OreDictionary.getOres("ingotLead")) + + for(ItemStack ore : OreDictionary.getOres("ingotLead")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), MekanismUtils.size(OreDictionary.getOres("dustLead").get(0), 1)); } - } - catch (Exception e) - { - } - - try - { - for (ItemStack ore : OreDictionary.getOres("oreSilver")) + } catch(Exception e) {} + + try { + for(ItemStack ore : OreDictionary.getOres("oreSilver")) { RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 2, 8)); RecipeHandler.addPurificationChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Clump, 3, 5)); } - - for (ItemStack ore : OreDictionary.getOres("ingotSilver")) + + for(ItemStack ore : OreDictionary.getOres("ingotSilver")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 1, 8)); } - } - catch (Exception e) - { - } - - for (ItemStack ore : OreDictionary.getOres("ingotRefinedObsidian")) + } catch(Exception e) {} + + for(ItemStack ore : OreDictionary.getOres("ingotRefinedObsidian")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 1, 3)); } - - for (ItemStack ore : OreDictionary.getOres("ingotOsmium")) + + for(ItemStack ore : OreDictionary.getOres("ingotOsmium")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 1, 2)); } - - for (ItemStack ore : OreDictionary.getOres("ingotRedstone")) + + for(ItemStack ore : OreDictionary.getOres("ingotRedstone")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(Item.redstone)); } - - for (ItemStack ore : OreDictionary.getOres("ingotRefinedGlowstone")) + + for(ItemStack ore : OreDictionary.getOres("ingotRefinedGlowstone")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(Item.glowstone)); } - - try - { + + try { RecipeHandler.addCrusherRecipe(new ItemStack(Ingot, 1, 2), MekanismUtils.size(OreDictionary.getOres("dustBronze").get(0), 1)); - - if (hooks.IC2Loaded) + + if(hooks.IC2Loaded) { Recipes.macerator.addRecipe(new RecipeInputOreDict("ingotBronze"), null, MekanismUtils.size(OreDictionary.getOres("dustBronze").get(0), 1)); } - if (hooks.TELoaded) + if(hooks.TELoaded) { CraftingManagers.pulverizerManager.addRecipe(40, new ItemStack(Ingot, 1, 2), MekanismUtils.size(OreDictionary.getOres("dustBronze").get(0), 1), false); } - } - catch (Exception e) - { - } - - try - { + } catch(Exception e) {} + + try { FurnaceRecipes.smelting().addSmelting(Dust.itemID, 6, MekanismUtils.size(OreDictionary.getOres("ingotCopper").get(0), 1), 1.0F); - } - catch (Exception e) - { - } - - try - { + } catch(Exception e) {} + + try { FurnaceRecipes.smelting().addSmelting(Dust.itemID, 7, MekanismUtils.size(OreDictionary.getOres("ingotTin").get(0), 1), 1.0F); - } - catch (Exception e) - { - } - - try - { + } catch(Exception e) {} + + try { FurnaceRecipes.smelting().addSmelting(Dust.itemID, 8, MekanismUtils.size(OreDictionary.getOres("ingotSilver").get(0), 1), 1.0F); - } - catch (Exception e) - { - } - - try - { + } catch(Exception e) {} + + try { RecipeHandler.addCrusherRecipe(new ItemStack(Item.coal), MekanismUtils.size(OreDictionary.getOres("dustCoal").get(0), 1)); - } - catch (Exception e) - { - } - - try - { + } catch(Exception e) {} + + try { RecipeHandler.addCrusherRecipe(new ItemStack(Item.coal, 1, 1), MekanismUtils.size(OreDictionary.getOres("dustCharcoal").get(0), 1)); - } - catch (Exception e) - { - } - - try - { - for (ItemStack ore : OreDictionary.getOres("ingotCopper")) + } catch(Exception e) {} + + try { + for(ItemStack ore : OreDictionary.getOres("ingotCopper")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 1, 6)); } - } - catch (Exception e) - { - } - - try - { - for (ItemStack ore : OreDictionary.getOres("ingotTin")) + } catch(Exception e) {} + + try { + for(ItemStack ore : OreDictionary.getOres("ingotTin")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 1, 7)); } - } - catch (Exception e) - { - } - - try - { - for (ItemStack ore : OreDictionary.getOres("ingotSilver")) + } catch(Exception e) {} + + try { + for(ItemStack ore : OreDictionary.getOres("ingotSilver")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 1, 8)); } - } - catch (Exception e) - { - } - - for (ItemStack ore : OreDictionary.getOres("dustIron")) + } catch(Exception e) {} + + for(ItemStack ore : OreDictionary.getOres("dustIron")) { RecipeHandler.addCombinerRecipe(MekanismUtils.size(ore, 8), new ItemStack(Block.oreIron)); } - - for (ItemStack ore : OreDictionary.getOres("ingotSteel")) + + for(ItemStack ore : OreDictionary.getOres("ingotSteel")) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ore, 1), new ItemStack(Dust, 1, 5)); } - - for (ItemStack ore : OreDictionary.getOres("dustGold")) + + for(ItemStack ore : OreDictionary.getOres("dustGold")) { RecipeHandler.addCombinerRecipe(MekanismUtils.size(ore, 8), new ItemStack(Block.oreGold)); } - - for (ItemStack ore : OreDictionary.getOres("dustObsidian")) + + for(ItemStack ore : OreDictionary.getOres("dustObsidian")) { RecipeHandler.addCombinerRecipe(MekanismUtils.size(ore, 2), new ItemStack(Block.obsidian)); RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("DIAMOND"), 10, MekanismUtils.size(ore, 1)), new ItemStack(Dust, 1, 3)); } - - for (ItemStack ore : OreDictionary.getOres("dustOsmium")) + + for(ItemStack ore : OreDictionary.getOres("dustOsmium")) { RecipeHandler.addCombinerRecipe(MekanismUtils.size(ore, 8), new ItemStack(OreBlock, 1, 0)); } - - for (ItemStack ore : OreDictionary.getOres("dustDiamond")) + + for(ItemStack ore : OreDictionary.getOres("dustDiamond")) { InfuseRegistry.registerInfuseObject(ore, new InfuseObject(InfuseRegistry.get("DIAMOND"), 80)); RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), new ItemStack(Item.diamond)); } - - try - { - for (ItemStack ore : OreDictionary.getOres("dustCopper")) + + try { + for(ItemStack ore : OreDictionary.getOres("dustCopper")) { RecipeHandler.addCombinerRecipe(MekanismUtils.size(ore, 8), MekanismUtils.size(OreDictionary.getOres("oreCopper").get(0), 1)); } - } - catch (Exception e) - { - } - - try - { - for (ItemStack ore : OreDictionary.getOres("ingotCopper")) + } catch(Exception e) {} + + try { + for(ItemStack ore : OreDictionary.getOres("ingotCopper")) { RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("TIN"), 10, MekanismUtils.size(ore, 1)), new ItemStack(Ingot, 1, 2)); } - } - catch (Exception e) - { - } - - try - { - for (ItemStack ore : OreDictionary.getOres("dustTin")) + } catch(Exception e) {} + + try { + for(ItemStack ore : OreDictionary.getOres("dustTin")) { RecipeHandler.addCombinerRecipe(MekanismUtils.size(ore, 8), MekanismUtils.size(OreDictionary.getOres("oreTin").get(0), 1)); InfuseRegistry.registerInfuseObject(ore, new InfuseObject(InfuseRegistry.get("TIN"), 50)); } - } - catch (Exception e) - { - } - - try - { - for (ItemStack ore : OreDictionary.getOres("dustLead")) + } catch(Exception e) {} + + try { + for(ItemStack ore : OreDictionary.getOres("dustLead")) { RecipeHandler.addCombinerRecipe(MekanismUtils.size(ore, 8), MekanismUtils.size(OreDictionary.getOres("oreLead").get(0), 1)); } - } - catch (Exception e) - { - } - - try - { - for (ItemStack ore : OreDictionary.getOres("dustSilver")) + } catch(Exception e) {} + + try { + for(ItemStack ore : OreDictionary.getOres("dustSilver")) { RecipeHandler.addCombinerRecipe(MekanismUtils.size(ore, 8), MekanismUtils.size(OreDictionary.getOres("oreSilver").get(0), 1)); } - } - catch (Exception e) + } catch(Exception e) {} + + if(hooks.MetallurgyCoreLoaded) { - } - - if (hooks.MetallurgyCoreLoaded) - { - try - { - String[] setNames = { "base", "precious", "nether", "fantasy", "ender", "utility" }; - - for (String setName : setNames) + try { + String[] setNames = {"base", "precious", "nether", "fantasy", "ender", "utility"}; + + for(String setName : setNames ) { - for (IOreInfo oreInfo : MetallurgyAPI.getMetalSet(setName).getOreList().values()) + for(IOreInfo oreInfo : MetallurgyAPI.getMetalSet(setName).getOreList().values()) { - switch (oreInfo.getType()) + switch(oreInfo.getType()) { - case ALLOY: + case ALLOY: { - if (oreInfo.getIngot() != null && oreInfo.getDust() != null) + if(oreInfo.getIngot() != null && oreInfo.getDust() != null) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(oreInfo.getIngot(), 1), MekanismUtils.size(oreInfo.getDust(), 1)); } - + break; } - case DROP: + case DROP: { ItemStack ore = oreInfo.getOre(); ItemStack drop = oreInfo.getDrop(); - - if (drop != null && ore != null) - { + + if(drop != null && ore != null) + { RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), MekanismUtils.size(drop, 12)); } - + break; } - default: + default: { ItemStack ore = oreInfo.getOre(); ItemStack dust = oreInfo.getDust(); ItemStack ingot = oreInfo.getIngot(); - - if (ore != null && dust != null) + + if(ore != null && dust != null) { RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 1), MekanismUtils.size(dust, 2)); RecipeHandler.addCombinerRecipe(MekanismUtils.size(dust, 8), MekanismUtils.size(ore, 1)); } - - if (ingot != null && dust != null) + + if(ingot != null && dust != null) { RecipeHandler.addCrusherRecipe(MekanismUtils.size(ingot, 1), MekanismUtils.size(dust, 1)); } - + break; } } } } - } - catch (Exception e) - { - } + } catch(Exception e) {} } } - + /** * Adds and registers all entities and tile entities. */ public void addEntities() { - // Entity IDs + //Entity IDs EntityRegistry.registerGlobalEntityID(EntityObsidianTNT.class, "ObsidianTNT", EntityRegistry.findGlobalUniqueEntityId()); EntityRegistry.registerGlobalEntityID(EntityRobit.class, "Robit", EntityRegistry.findGlobalUniqueEntityId()); - - // Registrations + + //Registrations EntityRegistry.registerModEntity(EntityObsidianTNT.class, "ObsidianTNT", 0, this, 40, 5, true); EntityRegistry.registerModEntity(EntityRobit.class, "Robit", 1, this, 40, 2, true); - - // Tile entities + + //Tile entities GameRegistry.registerTileEntity(TileEntityBoundingBlock.class, "BoundingBlock"); GameRegistry.registerTileEntity(TileEntityAdvancedBoundingBlock.class, "AdvancedBoundingBlock"); GameRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter"); - - // Load tile entities that have special renderers. + + //Load tile entities that have special renderers. proxy.registerSpecialTileEntities(); } - + @EventHandler public void serverStarting(FMLServerStartingEvent event) { - if (voiceServerEnabled) + if(voiceServerEnabled) { voiceManager.start(); } - + event.registerServerCommand(new CommandMekanism()); } - + @EventHandler public void serverStopping(FMLServerStoppingEvent event) { - if (voiceServerEnabled) + if(voiceServerEnabled) { voiceManager.stop(); } - + teleporters.clear(); dynamicInventories.clear(); ic2Registered.clear(); TransporterManager.flowingStacks.clear(); } - + @EventHandler public void preInit(FMLPreInitializationEvent event) { File config = event.getSuggestedConfigurationFile(); - - // Set the mod's configuration + + //Set the mod's configuration configuration = new Configuration(config); - - if (config.getAbsolutePath().contains("voltz")) + + if(config.getAbsolutePath().contains("voltz")) { System.out.println("[Mekanism] Detected Voltz in root directory - hello, fellow user!"); } - else if (config.getAbsolutePath().contains("tekkit")) + else if(config.getAbsolutePath().contains("tekkit")) { System.out.println("[Mekanism] Detected Tekkit in root directory - hello, fellow user!"); } - + GasRegistry.register(new Gas("hydrogen")).registerFluid(); GasRegistry.register(new Gas("oxygen")).registerFluid(); - + Mekanism.proxy.preInit(); - + MinecraftForge.EVENT_BUS.register(hooks); - - // Register infuses - InfuseRegistry.registerInfuseType(new InfuseType("CARBON", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 0, 0)); - InfuseRegistry.registerInfuseType(new InfuseType("TIN", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 4, 0)); - InfuseRegistry.registerInfuseType(new InfuseType("DIAMOND", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 8, 0)); + + //Register infuses + InfuseRegistry.registerInfuseType(new InfuseType("CARBON", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 0, 0)); + InfuseRegistry.registerInfuseType(new InfuseType("TIN", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 4, 0)); + InfuseRegistry.registerInfuseType(new InfuseType("DIAMOND", MekanismUtils.getResource(ResourceType.INFUSE, "Infusions.png"), 8, 0)); } - + @EventHandler public void postInit(FMLPostInitializationEvent event) { hooks.hook(); - + addIntegratedItems(); - + System.out.println("[Mekanism] Hooking complete."); - + proxy.loadSoundHandler(); } - + @EventHandler - public void init(FMLInitializationEvent event) + public void init(FMLInitializationEvent event) { - // Register the mod's ore handler + //Register the mod's ore handler GameRegistry.registerWorldGenerator(new OreHandler()); - - // Register the mod's GUI handler + + //Register the mod's GUI handler NetworkRegistry.instance().registerGuiHandler(this, new CoreGuiHandler()); - - // Initialization notification + + //Initialization notification System.out.println("[Mekanism] Version " + versionNumber + " initializing..."); - - // Get data from server. + + //Get data from server. new ThreadGetData(); - - // Register to receive subscribed events + + //Register to receive subscribed events MinecraftForge.EVENT_BUS.register(this); - - // Set up VoiceServerManager - if (voiceServerEnabled) + + //Set up VoiceServerManager + if(voiceServerEnabled) { voiceManager = new VoiceServerManager(); } - - // Register with TransmitterNetworkRegistry + + //Register with TransmitterNetworkRegistry TransmitterNetworkRegistry.initiate(); - - // Load configuration + + //Load configuration proxy.loadConfiguration(); - // Load this module + //Load this module addItems(); addBlocks(); addRecipes(); addEntities(); - - // Packet registrations + + //Packet registrations PacketHandler.registerPacket(PacketRobit.class); PacketHandler.registerPacket(PacketTransmitterUpdate.class); PacketHandler.registerPacket(PacketElectricChest.class); @@ -1109,111 +1159,90 @@ public class Mekanism PacketHandler.registerPacket(PacketConfigurationUpdate.class); PacketHandler.registerPacket(PacketSimpleGui.class); PacketHandler.registerPacket(PacketDigitalMinerGui.class); - - // Donators - donators.add("mrgreaper"); + + //Donators + donators.add("mrgreaper"); donators.add("ejmiv89"); donators.add("Greylocke"); - - // Load proxy + + //Load proxy proxy.registerRenderInformation(); proxy.loadUtilities(); - - // Completion notification + + //Completion notification System.out.println("[Mekanism] Loading complete."); - - // Success message + + //Success message logger.info("[Mekanism] Mod loaded."); } - + @ForgeSubscribe public void onEnergyTransferred(EnergyTransferEvent event) { - try - { + try { PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTransmitterUpdate().setParams(PacketType.ENERGY, event.energyNetwork.transmitters.iterator().next(), event.power)); - } - catch (Exception e) - { - } + } catch(Exception e) {} } - + @ForgeSubscribe public void onGasTransferred(GasTransferEvent event) { - try - { + try { PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTransmitterUpdate().setParams(PacketType.GAS, event.gasNetwork.transmitters.iterator().next(), event.transferType, event.didTransfer)); - } - catch (Exception e) - { - } + } catch(Exception e) {} } - + @ForgeSubscribe public void onLiquidTransferred(FluidTransferEvent event) { - try - { + try { PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTransmitterUpdate().setParams(PacketType.FLUID, event.fluidNetwork.transmitters.iterator().next(), event.fluidType, event.didTransfer)); - } - catch (Exception e) - { - } + } catch(Exception e) {} } - + @ForgeSubscribe public void onNetworkClientRequest(NetworkClientRequest event) { - try - { + try { PacketHandler.sendPacket(Transmission.SERVER, new PacketDataRequest().setParams(Object3D.get(event.tileEntity))); - } - catch (Exception e) - { - } + } catch(Exception e) {} } - + @ForgeSubscribe public void onClientTickUpdate(ClientTickUpdate event) { - try - { - if (event.operation == 0) + try { + if(event.operation == 0) { ClientTickHandler.tickingSet.remove(event.network); } - else - { + else { ClientTickHandler.tickingSet.add(event.network); } - } - catch (Exception e) - { - } + } catch(Exception e) {} } - + @ForgeSubscribe public synchronized void onChunkLoad(ChunkEvent.Load event) { - if (event.getChunk() != null && !event.world.isRemote) - { - Map copy = (Map) ((HashMap) event.getChunk().chunkTileEntityMap).clone(); + if(event.getChunk() != null && !event.world.isRemote) + { + Map copy = (Map)((HashMap)event.getChunk().chunkTileEntityMap).clone(); + + for(Iterator iter = copy.values().iterator(); iter.hasNext();) + { + Object obj = iter.next(); + + if(obj instanceof TileEntity) + { + TileEntity tileEntity = (TileEntity)obj; - for (Iterator iter = copy.values().iterator(); iter.hasNext();) - { - Object obj = iter.next(); - - if (obj instanceof TileEntity) - { - TileEntity tileEntity = (TileEntity) obj; - - if (tileEntity instanceof TileEntityElectricBlock) - { - ((TileEntityElectricBlock) tileEntity).register(); - } - } - } - } + if(tileEntity instanceof TileEntityElectricBlock) + { + ((TileEntityElectricBlock)tileEntity).register(); + } + } + } + } } }