use of minechem.potion.PotionChemical in project Minechem by iopleke.
the class MinechemRecipes method RegisterModRecipes.
public void RegisterModRecipes() {
// OreDict stuff
DecomposerRecipe.createAndAddRecipeSafely("dustSalt", new Element(ElementEnum.Na), new Element(ElementEnum.Cl));
DecomposerRecipe.createAndAddRecipeSafely("logWood", new Molecule(MoleculeEnum.cellulose, 8));
DecomposerRecipe.createAndAddRecipeSafely("plankWood", new Molecule(MoleculeEnum.cellulose, 2));
DecomposerRecipe.createAndAddRecipeSafely("ingotIron", this.element(ElementEnum.Fe, 16));
DecomposerRecipe.createAndAddRecipeSafely("ingotGold", this.element(ElementEnum.Au, 16));
DecomposerRecipe.createAndAddRecipeSafely("ingotCopper", this.element(ElementEnum.Cu, 16));
DecomposerRecipe.createAndAddRecipeSafely("ingotTin", this.element(ElementEnum.Sn, 16));
DecomposerRecipe.createAndAddRecipeSafely("ingotSilver", this.element(ElementEnum.Ag, 16));
DecomposerRecipe.createAndAddRecipeSafely("ingotLead", this.element(ElementEnum.Pb, 16));
DecomposerRecipe.createAndAddRecipeSafely("ingotPlatinum", this.element(ElementEnum.Pt, 16));
DecomposerRecipe.createAndAddRecipeSafely("ingotAluminium", this.element(ElementEnum.Al, 16));
DecomposerRecipe.createAndAddRecipeSafely("ingotMagnesium", this.element(ElementEnum.Mg, 16));
DecomposerRecipe.createAndAddRecipeSafely("ingotSteel", new PotionChemical[] { this.element(ElementEnum.Fe, 15), this.element(ElementEnum.C, 1) });
DecomposerRecipe.createAndAddRecipeSafely("ingotHSLA", new PotionChemical[] { this.element(ElementEnum.Fe, 15), this.element(ElementEnum.C, 1) });
DecomposerRecipe.createAndAddRecipeSafely("ingotBronze", new PotionChemical[] { this.element(ElementEnum.Cu, 12), this.element(ElementEnum.Sn, 4) });
DecomposerRecipe.createAndAddRecipeSafely("ingotElectrum", new PotionChemical[] { this.element(ElementEnum.Ag, 8), this.element(ElementEnum.Au, 8) });
DecomposerRecipe.createAndAddRecipeSafely("ingotInvar", new PotionChemical[] { this.element(ElementEnum.Fe, 10), this.element(ElementEnum.Ni, 6) });
SynthesisRecipe.createAndAddRecipeSafely("ingotIron", false, COST_INGOT, this.element(ElementEnum.Fe, 16));
SynthesisRecipe.createAndAddRecipeSafely("ingotGold", false, COST_INGOT, this.element(ElementEnum.Au, 16));
SynthesisRecipe.createAndAddRecipeSafely("ingotCopper", false, COST_INGOT, this.element(ElementEnum.Cu, 16));
SynthesisRecipe.createAndAddRecipeSafely("ingotTin", false, COST_INGOT, this.element(ElementEnum.Sn, 16));
SynthesisRecipe.createAndAddRecipeSafely("ingotSilver", false, COST_INGOT, this.element(ElementEnum.Ag, 16));
SynthesisRecipe.createAndAddRecipeSafely("ingotLead", false, COST_INGOT, this.element(ElementEnum.Pb, 16));
SynthesisRecipe.createAndAddRecipeSafely("ingotPlatinum", false, COST_INGOT, this.element(ElementEnum.Pt, 16));
SynthesisRecipe.createAndAddRecipeSafely("ingotAluminium", false, COST_INGOT, this.element(ElementEnum.Al, 16));
SynthesisRecipe.createAndAddRecipeSafely("ingotMagnesium", false, COST_INGOT, this.element(ElementEnum.Mg, 16));
SynthesisRecipe.createAndAddRecipeSafely("ingotSteel", false, COST_INGOT, new PotionChemical[] { this.element(ElementEnum.Fe, 15), this.element(ElementEnum.C, 1) });
SynthesisRecipe.createAndAddRecipeSafely("ingotHSLA", false, COST_INGOT, new PotionChemical[] { this.element(ElementEnum.Fe, 15), this.element(ElementEnum.C, 1) });
SynthesisRecipe.createAndAddRecipeSafely("ingotBronze", false, COST_INGOT, new PotionChemical[] { this.element(ElementEnum.Cu, 12), this.element(ElementEnum.Sn, 4) });
SynthesisRecipe.createAndAddRecipeSafely("ingotElectrum", false, COST_INGOT, new PotionChemical[] { this.element(ElementEnum.Ag, 8), this.element(ElementEnum.Au, 8) });
SynthesisRecipe.createAndAddRecipeSafely("ingotInvar", false, COST_INGOT, new PotionChemical[] { this.element(ElementEnum.Fe, 10), this.element(ElementEnum.Ni, 6) });
// Thermal Expansion
if (Loader.isModLoaded("ThermalExpansion")) {
Block rockwool = GameRegistry.findBlock("ThermalExpansion", "Rockwool");
ItemStack blockRockWool = new ItemStack(rockwool, 1, 0);
ItemStack blockRockOrangeWool = new ItemStack(rockwool, 1, 1);
ItemStack blockRockMagentaWool = new ItemStack(rockwool, 1, 2);
ItemStack blockRockLightBlueWool = new ItemStack(rockwool, 1, 3);
ItemStack blockRockYellowWool = new ItemStack(rockwool, 1, 4);
ItemStack blockRockLimeWool = new ItemStack(rockwool, 1, 5);
ItemStack blockRockPinkWool = new ItemStack(rockwool, 1, 6);
ItemStack blockRockGrayWool = new ItemStack(rockwool, 1, 7);
ItemStack blockRockLightGrayWool = new ItemStack(rockwool, 1, 8);
ItemStack blockRockCyanWool = new ItemStack(rockwool, 1, 9);
ItemStack blockRockPurpleWool = new ItemStack(rockwool, 1, 10);
ItemStack blockRockBlueWool = new ItemStack(rockwool, 1, 11);
ItemStack blockRockBrownWool = new ItemStack(rockwool, 1, 12);
ItemStack blockRockGreenWool = new ItemStack(rockwool, 1, 13);
ItemStack blockRockRedWool = new ItemStack(rockwool, 1, 14);
ItemStack blockRockBlackWool = new ItemStack(rockwool, 1, 15);
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.whitePigment) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockOrangeWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.orangePigment) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockMagentaWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.lightbluePigment), this.molecule(MoleculeEnum.redPigment) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockLightBlueWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.lightbluePigment) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockYellowWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.yellowPigment) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockLimeWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.limePigment) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockPinkWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.redPigment), this.molecule(MoleculeEnum.whitePigment) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockGrayWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.whitePigment), this.molecule(MoleculeEnum.blackPigment, 2) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockLightGrayWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.whitePigment), this.molecule(MoleculeEnum.blackPigment) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockCyanWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.lightbluePigment), this.molecule(MoleculeEnum.whitePigment) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockPurpleWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.purplePigment) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockBlueWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.lazurite) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockBrownWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.tannicacid) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockGreenWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.greenPigment) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockRedWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.redPigment) }));
DecomposerRecipe.add(new DecomposerRecipeChance(blockRockBlackWool, 0.2F, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.blackPigment) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.whitePigment) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockOrangeWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.orangePigment) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockMagentaWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.lightbluePigment), this.molecule(MoleculeEnum.redPigment) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockLightBlueWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.lightbluePigment) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockYellowWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.yellowPigment) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockLimeWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.limePigment) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockPinkWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.redPigment), this.molecule(MoleculeEnum.whitePigment) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockGrayWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.whitePigment), this.molecule(MoleculeEnum.blackPigment, 2) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockLightGrayWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.whitePigment), this.molecule(MoleculeEnum.blackPigment) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockCyanWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.lightbluePigment), this.molecule(MoleculeEnum.whitePigment) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockPurpleWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.purplePigment) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockBlueWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.lazurite) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockGreenWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.greenPigment) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockRedWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.redPigment) }));
SynthesisRecipe.add(new SynthesisRecipe(blockRockBlackWool, false, COST_WOOL, new PotionChemical[] { this.molecule(MoleculeEnum.asbestos, 2), this.molecule(MoleculeEnum.blackPigment) }));
Block glass = GameRegistry.findBlock("ThermalExpansion", "Glass");
Block frame = GameRegistry.findBlock("ThermalExpansion", "Frame");
Block light = GameRegistry.findBlock("ThermalExpansion", "Light");
ItemStack glassStack = new ItemStack(glass);
ItemStack lightFrameStack = new ItemStack(frame, 1, 9);
ItemStack lightStack = new ItemStack(light);
DecomposerRecipe.add(new DecomposerRecipe(glassStack, new PotionChemical[] { this.molecule(MoleculeEnum.magnesiumOxide, 8), this.molecule(MoleculeEnum.siliconOxide, 16), this.element(ElementEnum.Pb, 8) }));
DecomposerRecipe.add(new DecomposerRecipe(lightFrameStack, new PotionChemical[] { this.molecule(MoleculeEnum.siliconDioxide, 4), this.molecule(MoleculeEnum.galliumarsenide, 1), this.molecule(MoleculeEnum.magnesiumOxide, 16), this.molecule(MoleculeEnum.siliconOxide, 32), this.element(ElementEnum.Pb, 16), this.element(ElementEnum.Cu, 16) }));
DecomposerRecipe.add(new DecomposerRecipe(lightStack, new PotionChemical[] { this.molecule(MoleculeEnum.siliconDioxide, 4), this.molecule(MoleculeEnum.galliumarsenide, 1), this.molecule(MoleculeEnum.magnesiumOxide, 16), this.molecule(MoleculeEnum.siliconOxide, 32), this.element(ElementEnum.Pb, 16), this.element(ElementEnum.Cu, 16), this.element(ElementEnum.P, 4) }));
}
if (Loader.isModLoaded("ThermalFoundation")) {
Item bucket = GameRegistry.findItem("ThermalFoundation", "bucket");
Item material = GameRegistry.findItem("ThermalFoundation", "material");
ItemStack redstoneBucket = new ItemStack(bucket, 1, 0);
ItemStack glowstoneBucket = new ItemStack(bucket, 1, 1);
ItemStack enderBucket = new ItemStack(bucket, 1, 2);
ItemStack signalumBlend = new ItemStack(material, 1, 42);
ItemStack lumiumBlend = new ItemStack(material, 1, 43);
ItemStack enderiumBlend = new ItemStack(material, 1, 44);
ItemStack signalumIngot = new ItemStack(material, 1, 74);
ItemStack lumiumIngot = new ItemStack(material, 1, 75);
ItemStack enderiumIngot = new ItemStack(material, 1, 76);
DecomposerRecipe.add(new DecomposerRecipe(redstoneBucket, new PotionChemical[] { this.element(ElementEnum.Cu, 4), this.element(ElementEnum.Fe, 48), this.molecule(MoleculeEnum.iron3oxide, 4) }));
DecomposerRecipe.add(new DecomposerRecipe(enderBucket, new PotionChemical[] { this.element(ElementEnum.Fe, 48), this.element(ElementEnum.Es, 4), this.molecule(MoleculeEnum.calciumCarbonate, 32) }));
DecomposerRecipe.add(new DecomposerRecipe(glowstoneBucket, new PotionChemical[] { this.element(ElementEnum.Fe, 48), this.element(ElementEnum.P, 4) }));
DecomposerRecipe.add(new DecomposerRecipe(signalumBlend, new PotionChemical[] { this.element(ElementEnum.Cu, 12), this.element(ElementEnum.Ag, 4), this.molecule(MoleculeEnum.iron3oxide) }));
DecomposerRecipe.add(new DecomposerRecipe(signalumIngot, new PotionChemical[] { this.element(ElementEnum.Cu, 12), this.element(ElementEnum.Ag, 4), this.molecule(MoleculeEnum.iron3oxide) }));
DecomposerRecipe.add(new DecomposerRecipe(lumiumBlend, new PotionChemical[] { this.element(ElementEnum.Sn, 12), this.element(ElementEnum.Ag, 4), this.element(ElementEnum.P) }));
DecomposerRecipe.add(new DecomposerRecipe(lumiumIngot, new PotionChemical[] { this.element(ElementEnum.Sn, 12), this.element(ElementEnum.Ag, 4), this.element(ElementEnum.P) }));
DecomposerRecipe.add(new DecomposerRecipe(enderiumBlend, new PotionChemical[] { this.element(ElementEnum.Sn, 8), this.element(ElementEnum.Ag, 4), this.element(ElementEnum.Pt, 4), this.element(ElementEnum.Es), this.molecule(MoleculeEnum.calciumCarbonate, 8) }));
DecomposerRecipe.add(new DecomposerRecipe(enderiumIngot, new PotionChemical[] { this.element(ElementEnum.Sn, 8), this.element(ElementEnum.Ag, 4), this.element(ElementEnum.Pt, 4), this.element(ElementEnum.Es), this.molecule(MoleculeEnum.calciumCarbonate, 8) }));
SynthesisRecipe.add(new SynthesisRecipe(signalumBlend, false, COST_INGOT, new PotionChemical[] { this.element(ElementEnum.Cu, 12), this.element(ElementEnum.Ag, 4), this.molecule(MoleculeEnum.iron3oxide) }));
SynthesisRecipe.add(new SynthesisRecipe(signalumIngot, false, COST_INGOT, new PotionChemical[] { this.element(ElementEnum.Cu, 12), this.element(ElementEnum.Ag, 4), this.molecule(MoleculeEnum.iron3oxide) }));
SynthesisRecipe.add(new SynthesisRecipe(lumiumBlend, false, COST_INGOT, new PotionChemical[] { this.element(ElementEnum.Sn, 12), this.element(ElementEnum.Ag, 4), this.element(ElementEnum.P) }));
SynthesisRecipe.add(new SynthesisRecipe(lumiumIngot, false, COST_INGOT, new PotionChemical[] { this.element(ElementEnum.Sn, 12), this.element(ElementEnum.Ag, 4), this.element(ElementEnum.P) }));
SynthesisRecipe.add(new SynthesisRecipe(enderiumBlend, false, COST_INGOT, new PotionChemical[] { this.element(ElementEnum.Sn, 8), this.element(ElementEnum.Ag, 4), this.element(ElementEnum.Pt, 4), this.element(ElementEnum.Es), this.molecule(MoleculeEnum.calciumCarbonate, 8) }));
SynthesisRecipe.add(new SynthesisRecipe(enderiumIngot, false, COST_INGOT * 2, new PotionChemical[] { this.element(ElementEnum.Sn, 8), this.element(ElementEnum.Ag, 4), this.element(ElementEnum.Pt, 4), this.element(ElementEnum.Es), this.molecule(MoleculeEnum.calciumCarbonate, 8), this.molecule(MoleculeEnum.iron3oxide), this.element(ElementEnum.Pu), this.element(ElementEnum.C, 8), this.element(ElementEnum.S, 16) }));
}
// Redstone Arsenal
if (Loader.isModLoaded("RedstoneArsenal")) {
Item alloy = GameRegistry.findItem("RedstoneArsenal", "material");
ItemStack blend = new ItemStack(alloy, 1, 0);
ItemStack ingot = new ItemStack(alloy, 1, 32);
ItemStack nugget = new ItemStack(alloy, 1, 64);
ItemStack gem = new ItemStack(alloy, 1, 96);
DecomposerRecipe.add(new DecomposerRecipe(blend, new PotionChemical[] { this.element(ElementEnum.Au, 8), this.element(ElementEnum.Ag, 8), this.molecule(MoleculeEnum.iron3oxide), this.element(ElementEnum.Cu) }));
DecomposerRecipe.add(new DecomposerRecipe(ingot, new PotionChemical[] { this.element(ElementEnum.Au, 8), this.element(ElementEnum.Ag, 8), this.molecule(MoleculeEnum.iron3oxide), this.element(ElementEnum.Cu) }));
DecomposerRecipe.add(new DecomposerRecipeSelect(nugget, 0.11F, new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Au, 8), this.element(ElementEnum.Ag, 8), this.molecule(MoleculeEnum.iron3oxide), this.element(ElementEnum.Cu) })));
DecomposerRecipe.add(new DecomposerRecipe(gem, new PotionChemical[] { this.molecule(MoleculeEnum.fullrene, 3), this.molecule(MoleculeEnum.iron3oxide), this.element(ElementEnum.Cu) }));
SynthesisRecipe.add(new SynthesisRecipe(blend, false, COST_INGOT * 2, new PotionChemical[] { this.element(ElementEnum.Au, 8), this.element(ElementEnum.Ag, 8), this.molecule(MoleculeEnum.iron3oxide, 2), this.element(ElementEnum.Cu, 2) }));
SynthesisRecipe.add(new SynthesisRecipe(ingot, false, COST_INGOT * 2, new PotionChemical[] { this.element(ElementEnum.Au, 8), this.element(ElementEnum.Ag, 8), this.molecule(MoleculeEnum.iron3oxide, 2), this.element(ElementEnum.Cu, 2) }));
SynthesisRecipe.add(new SynthesisRecipe(gem, false, COST_INGOT * 2, new PotionChemical[] { this.molecule(MoleculeEnum.fullrene, 3), this.molecule(MoleculeEnum.iron3oxide, 2), this.element(ElementEnum.Cu, 2) }));
}
// EnderIO
if (Loader.isModLoaded("EnderIO")) {
Item alloy = GameRegistry.findItem("EnderIO", "itemAlloy");
ItemStack electricalSteel = new ItemStack(alloy, 1, 0);
ItemStack energeticAlloy = new ItemStack(alloy, 1, 1);
ItemStack vibrantAlloy = new ItemStack(alloy, 1, 2);
ItemStack redstoneAlloy = new ItemStack(alloy, 1, 3);
ItemStack conductiveIron = new ItemStack(alloy, 1, 4);
ItemStack pulsatingIron = new ItemStack(alloy, 1, 5);
ItemStack darkSteel = new ItemStack(alloy, 1, 6);
ItemStack soularium = new ItemStack(alloy, 1, 7);
DecomposerRecipe.add(new DecomposerRecipe(electricalSteel, new PotionChemical[] { this.element(ElementEnum.Fe, 8), this.element(ElementEnum.C, 4), this.element(ElementEnum.Si, 4) }));
DecomposerRecipe.add(new DecomposerRecipe(energeticAlloy, new PotionChemical[] { this.element(ElementEnum.Au, 8), this.element(ElementEnum.P, 1), this.molecule(MoleculeEnum.iron3oxide), this.element(ElementEnum.Cu) }));
DecomposerRecipe.add(new DecomposerRecipe(vibrantAlloy, new PotionChemical[] { this.element(ElementEnum.Au, 8), this.element(ElementEnum.P, 1), this.molecule(MoleculeEnum.iron3oxide), this.element(ElementEnum.Cu), this.element(ElementEnum.Es), this.molecule(MoleculeEnum.calciumCarbonate, 4) }));
DecomposerRecipe.add(new DecomposerRecipe(redstoneAlloy, new PotionChemical[] { this.element(ElementEnum.Si, 12), this.molecule(MoleculeEnum.iron3oxide), this.element(ElementEnum.Cu) }));
DecomposerRecipe.add(new DecomposerRecipe(conductiveIron, new PotionChemical[] { this.element(ElementEnum.Fe, 12), this.molecule(MoleculeEnum.iron3oxide), this.element(ElementEnum.Cu) }));
DecomposerRecipe.add(new DecomposerRecipe(pulsatingIron, new PotionChemical[] { this.element(ElementEnum.Fe, 12), this.element(ElementEnum.Es), this.molecule(MoleculeEnum.calciumCarbonate, 6) }));
DecomposerRecipe.add(new DecomposerRecipe(darkSteel, new PotionChemical[] { this.molecule(MoleculeEnum.magnesiumOxide, 4), this.molecule(MoleculeEnum.siliconOxide, 8), this.element(ElementEnum.Fe, 8), this.element(ElementEnum.C, 4) }));
DecomposerRecipe.add(new DecomposerRecipeSelect(soularium, 0.4F, new DecomposerRecipe[] { new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Pb, 3), this.element(ElementEnum.Be, 1), this.element(ElementEnum.Si, 2), this.element(ElementEnum.O), this.element(ElementEnum.Au, 8) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Pb, 1), this.element(ElementEnum.Si, 5), this.element(ElementEnum.O, 2), this.element(ElementEnum.Au, 8) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Si, 2), this.element(ElementEnum.O), this.element(ElementEnum.Au, 8) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Si, 6), this.element(ElementEnum.O, 2), this.element(ElementEnum.Au, 8) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Es, 1), this.element(ElementEnum.O, 2), this.element(ElementEnum.Au, 8) }) }));
}
if (Loader.isModLoaded("appliedenergistics2")) {
MoleculeEnum certusQuartzMolecule = MoleculeEnum.aluminiumPhosphate;
MoleculeEnum chargedCertusQuartzMolecule = MoleculeEnum.aluminiumHypophosphite;
PotionChemical chargedCertusQuartzChemical = new Molecule(chargedCertusQuartzMolecule);
PotionChemical[] chargedCertusQuartzDecompositionFormula = new PotionChemical[] { new Molecule(chargedCertusQuartzMolecule, 4) };
PotionChemical[] chargedCertusQuartzCrystalSynthesisFormula = new PotionChemical[] { null, chargedCertusQuartzChemical, null, chargedCertusQuartzChemical, null, chargedCertusQuartzChemical, null, chargedCertusQuartzChemical, null };
PotionChemical[] quartzGlassDecompositionFormula = new PotionChemical[] { new Molecule(certusQuartzMolecule, 5), new Molecule(MoleculeEnum.siliconDioxide, 16) };
PotionChemical[] quartzGlassCrystalSynthesisFormula = new PotionChemical[] { new Molecule(certusQuartzMolecule), new Molecule(MoleculeEnum.siliconDioxide, 4), new Molecule(certusQuartzMolecule), new Molecule(MoleculeEnum.siliconDioxide, 4), new Molecule(certusQuartzMolecule), new Molecule(MoleculeEnum.siliconDioxide, 4), new Molecule(certusQuartzMolecule), new Molecule(MoleculeEnum.siliconDioxide, 4), new Molecule(certusQuartzMolecule) };
Item item = GameRegistry.findItem("appliedenergistics2", "item.ItemMultiMaterial");
Block skyStone = GameRegistry.findBlock("appliedenergistics2", "tile.BlockSkyStone");
Block quartzGlass = GameRegistry.findBlock("appliedenergistics2", "tile.BlockQuartzGlass");
ItemStack charged = new ItemStack(item, 1, 1);
ItemStack singularity = new ItemStack(item, 1, 47);
ItemStack skystone = new ItemStack(skyStone);
ItemStack quartzglass = new ItemStack(quartzGlass);
DecomposerRecipe.add(new DecomposerRecipe(charged, chargedCertusQuartzDecompositionFormula));
SynthesisRecipe.add(new SynthesisRecipe(charged, true, 30000, chargedCertusQuartzCrystalSynthesisFormula));
DecomposerRecipe.add(new DecomposerRecipe(singularity, new PotionChemical[] { this.element(ElementEnum.Fm, 148), this.element(ElementEnum.Md, 142), this.element(ElementEnum.No, 133), this.element(ElementEnum.Lr, 124), this.element(ElementEnum.Rf, 107), this.element(ElementEnum.Db, 104), this.element(ElementEnum.Sg, 93), this.element(ElementEnum.Bh, 81), this.element(ElementEnum.Hs, 67), this.element(ElementEnum.Mt, 54), this.element(ElementEnum.Ds, 52), this.element(ElementEnum.Rg, 37), this.element(ElementEnum.Cn, 33), this.element(ElementEnum.Uut, 22) }));
DecomposerRecipe.add(new DecomposerRecipeSelect(skystone, 0.9F, new DecomposerRecipe[] { new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Si), this.element(ElementEnum.He) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Fe), this.element(ElementEnum.Xe) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Mg), this.element(ElementEnum.Ar) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Ti), this.element(ElementEnum.He) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Pb), this.element(ElementEnum.Ne) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Zn), this.element(ElementEnum.He) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Al), this.element(ElementEnum.He) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Si), this.element(ElementEnum.Xe) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Fe), this.element(ElementEnum.Ar) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Mg), this.element(ElementEnum.Kr) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Ti), this.element(ElementEnum.Ne) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Pb), this.element(ElementEnum.Rn) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Zn), this.element(ElementEnum.Ne) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Al), this.element(ElementEnum.Ar) }) }));
DecomposerRecipe.add(new DecomposerRecipe(quartzglass, quartzGlassDecompositionFormula));
SynthesisRecipe.add(new SynthesisRecipe(quartzglass, true, 30000, quartzGlassCrystalSynthesisFormula));
}
// RailCraft
if (Loader.isModLoaded("Railcraft")) {
Block metalPost = GameRegistry.findBlock("Railcraft", "tile.railcraft.post.metal");
Block metalPlatform = GameRegistry.findBlock("Railcraft", "tile.railcraft.post.metal.platform");
Block post = GameRegistry.findBlock("Railcraft", "tile.railcraft.post");
DecomposerRecipe.add(new DecomposerRecipe(new ItemStack(metalPost), this.element(ElementEnum.Fe, 5)));
DecomposerRecipe.add(new DecomposerRecipe(new ItemStack(metalPlatform), this.element(ElementEnum.Fe, 5)));
DecomposerRecipe.add(new DecomposerRecipe(new ItemStack(post), new PotionChemical[] {}));
}
}
use of minechem.potion.PotionChemical in project Minechem by iopleke.
the class MinechemRecipes method registerFluidRecipes.
public void registerFluidRecipes() {
// Quick and dirty fix for the Thermal Expansion Resonant Ender 6x bug
int threeQuarterFluidPerIngot = 180;
DecomposerRecipe.add(new DecomposerFluidRecipe(new FluidStack(FluidRegistry.WATER, BUCKET_AMOUNT), new PotionChemical[] { this.element(ElementEnum.H, 2), this.element(ElementEnum.O) }));
// Lava
// This assumes lava is composed from cobblestone at a 4:1 ratio
// as well as having slightly higher purity
DecomposerRecipe.add(new DecomposerFluidRecipeSelect("lava", BUCKET_AMOUNT / 4, 0.2F, new DecomposerRecipe[] { new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Si), this.element(ElementEnum.O) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Fe), this.element(ElementEnum.O) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Mg), this.element(ElementEnum.O) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Ti), this.element(ElementEnum.O) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Pb), this.element(ElementEnum.O) }), new DecomposerRecipe(new PotionChemical[] { this.element(ElementEnum.Na), this.element(ElementEnum.Cl) }) }));
// Mod fluids
// Checks if the fluid exists
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("water", BUCKET_AMOUNT, new PotionChemical[] { this.element(ElementEnum.H, 2), this.element(ElementEnum.O) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("iron.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Fe, 16) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("gold.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Au, 16) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("copper.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Cu, 16) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("tin.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Sn, 16) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("aluminum.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Al, 16) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("cobalt.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Co, 16) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("ardite.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Fe, 2), this.element(ElementEnum.W, 2), this.element(ElementEnum.Si, 2) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("bronze.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Cu, 12), this.element(ElementEnum.Sn, 4) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("aluminumbrass.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Cu, 12), this.element(ElementEnum.Al, 4) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("manyullyn.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Co, 8), this.element(ElementEnum.Fe, 1), this.element(ElementEnum.W, 1), this.element(ElementEnum.Si, 1) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("alumite.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Al, 8), this.element(ElementEnum.Fe, 3), this.molecule(MoleculeEnum.siliconDioxide, 2), this.molecule(MoleculeEnum.magnesiumOxide, 1) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("obsidian.molten", INGOT_AMOUNT, new PotionChemical[] { this.molecule(MoleculeEnum.siliconDioxide, 16), this.molecule(MoleculeEnum.magnesiumOxide, 8) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("steel.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Fe, 14), this.element(ElementEnum.C, 2) });
// This ratio should be tested
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("stone.seared", INGOT_AMOUNT, new PotionChemical[] { this.molecule(MoleculeEnum.siliconOxide, 12), this.molecule(MoleculeEnum.ironOxide, 4) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("glass.molten", INGOT_AMOUNT, new PotionChemical[] { this.molecule(MoleculeEnum.siliconDioxide, 16) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("emerald.molten", INGOT_AMOUNT, new PotionChemical[] { this.molecule(MoleculeEnum.beryl, 6), this.element(ElementEnum.Cr, 6), this.element(ElementEnum.V, 6) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("blood.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.O, 6), this.element(ElementEnum.Fe, 2), this.molecule(MoleculeEnum.ironOxide, 8) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("nickel.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Ni, 16) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("lead.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Pb, 16) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("silver.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Ag, 16) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("platinum.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Pt, 16) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("invar.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Fe, 10), this.element(ElementEnum.Ni, 6) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("electrum.molten", INGOT_AMOUNT, new PotionChemical[] { this.element(ElementEnum.Ag, 8), this.element(ElementEnum.Au, 8) });
DecomposerFluidRecipe.createAndAddFluidRecipeSafely("ender", threeQuarterFluidPerIngot, new PotionChemical[] { this.molecule(MoleculeEnum.calciumCarbonate), this.molecule(MoleculeEnum.calciumCarbonate), this.molecule(MoleculeEnum.calciumCarbonate), this.molecule(MoleculeEnum.calciumCarbonate), this.element(ElementEnum.Es), this.molecule(MoleculeEnum.calciumCarbonate), this.molecule(MoleculeEnum.calciumCarbonate), this.molecule(MoleculeEnum.calciumCarbonate), this.molecule(MoleculeEnum.calciumCarbonate) });
registerMFRFluidRecipes();
if (Settings.decomposeChemicalFluids) {
for (ElementEnum element : FluidHelper.elements.keySet()) {
DecomposerFluidRecipe.add(new DecomposerFluidRecipe(new FluidStack(FluidHelper.elements.get(element), 125), new Element(element, 1)));
}
for (MoleculeEnum molecule : FluidHelper.molecules.keySet()) {
DecomposerFluidRecipe.add(new DecomposerFluidRecipe(new FluidStack(FluidHelper.molecules.get(molecule), 125), molecule.componentsArray()));
}
}
}
use of minechem.potion.PotionChemical in project Minechem by iopleke.
the class MinechemRecipes method registerOre.
public void registerOre(String oreName) {
if (oreName.contains("gemApatite")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.element(ElementEnum.Ca, 5), this.molecule(MoleculeEnum.phosphate, 4), this.element(ElementEnum.Cl) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 1000, new PotionChemical[] { this.element(ElementEnum.Ca, 5), this.molecule(MoleculeEnum.phosphate, 4), this.element(ElementEnum.Cl) });
} else if (oreName.contains("plateSilicon")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.element(ElementEnum.Si, 2) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 1000, new PotionChemical[] { this.element(ElementEnum.Si, 2) });
} else if (oreName.contains("xychoriumBlue")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.element(ElementEnum.Zr, 2), this.element(ElementEnum.Cu, 1) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 300, new PotionChemical[] { this.element(ElementEnum.Zr, 2), this.element(ElementEnum.Cu, 1) });
} else if (oreName.contains("xychoriumRed")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.element(ElementEnum.Zr, 2), this.element(ElementEnum.Fe, 1) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 300, new PotionChemical[] { this.element(ElementEnum.Zr, 2), this.element(ElementEnum.Fe, 1) });
} else if (oreName.contains("xychoriumGreen")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.element(ElementEnum.Zr, 2), this.element(ElementEnum.V, 1) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 300, new PotionChemical[] { this.element(ElementEnum.Zr, 2), this.element(ElementEnum.V, 1) });
} else if (oreName.contains("xychoriumDark")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.element(ElementEnum.Zr, 2), this.element(ElementEnum.Si, 1) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 300, new PotionChemical[] { this.element(ElementEnum.Zr, 2), this.element(ElementEnum.Si, 1) });
} else if (oreName.contains("xychoriumLight")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.element(ElementEnum.Zr, 2), this.element(ElementEnum.Ti, 1) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 300, new PotionChemical[] { this.element(ElementEnum.Zr, 2), this.element(ElementEnum.Ti, 1) });
} else if (oreName.contains("gemPeridot")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.molecule(MoleculeEnum.olivine) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 1000, new PotionChemical[] { this.molecule(MoleculeEnum.olivine) });
} else if (oreName.contains("cropMaloberry")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.molecule(MoleculeEnum.xylitol), this.molecule(MoleculeEnum.sucrose) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 1000, new PotionChemical[] { this.molecule(MoleculeEnum.xylitol), this.molecule(MoleculeEnum.sucrose) });
} else if (oreName.contains("cropDuskberry")) {
if (Settings.recreationalChemicalEffects) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.molecule(MoleculeEnum.psilocybin), this.element(ElementEnum.S, 2) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 1000, new PotionChemical[] { this.molecule(MoleculeEnum.psilocybin), this.element(ElementEnum.S, 2) });
}
} else if (oreName.contains("cropSkyberry")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.molecule(MoleculeEnum.theobromine), this.element(ElementEnum.S, 2) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 1000, new PotionChemical[] { this.molecule(MoleculeEnum.theobromine), this.element(ElementEnum.S, 2) });
} else if (oreName.contains("cropBlightberry")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.molecule(MoleculeEnum.asprin), this.element(ElementEnum.S, 2) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 1000, new PotionChemical[] { this.molecule(MoleculeEnum.asprin), this.element(ElementEnum.S, 2) });
} else if (oreName.contains("cropBlueberry")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.molecule(MoleculeEnum.blueorgodye), this.molecule(MoleculeEnum.sucrose, 2) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 1000, new PotionChemical[] { this.molecule(MoleculeEnum.blueorgodye), this.molecule(MoleculeEnum.sucrose, 2) });
} else if (oreName.contains("cropRaspberry")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.molecule(MoleculeEnum.redorgodye), this.molecule(MoleculeEnum.sucrose, 2) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 1000, new PotionChemical[] { this.molecule(MoleculeEnum.redorgodye), this.molecule(MoleculeEnum.sucrose, 2) });
} else if (oreName.contains("cropBlackberry")) {
DecomposerRecipe.createAndAddRecipeSafely(oreName, new PotionChemical[] { this.molecule(MoleculeEnum.purpleorgodye), this.molecule(MoleculeEnum.sucrose, 2) });
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, 1000, new PotionChemical[] { this.molecule(MoleculeEnum.purpleorgodye), this.molecule(MoleculeEnum.sucrose, 2) });
} else {
for (OreDictionaryHandler handler : this.oreDictionaryHandlers) {
if (handler.canHandle(oreName)) {
handler.handle(oreName);
return;
}
}
}
}
use of minechem.potion.PotionChemical in project Minechem by iopleke.
the class SynthesisRecipe method createAndAddRecipeSafely.
public static void createAndAddRecipeSafely(String item, boolean shaped, int energyCost, PotionChemical... chemicals) {
ArrayList<ItemStack> oreDictEntries = OreDictionary.getOres(item);
int entry = 0;
for (Iterator<ItemStack> itr = oreDictEntries.iterator(); itr.hasNext() && entry < 8; entry++) {
PotionChemical[] val = new PotionChemical[9];
for (int i = 0; i < chemicals.length; i++) val[(i + entry) % 9] = chemicals[i];
ItemStack ore = itr.next();
SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(ore.getItem(), 1, ore.getItemDamage()), true, energyCost, val));
}
}
use of minechem.potion.PotionChemical in project Minechem by iopleke.
the class MinechemUtil method pushTogetherChemicals.
public static ArrayList<PotionChemical> pushTogetherChemicals(ArrayList<PotionChemical> oldList) {
ArrayList<PotionChemical> list = new ArrayList<PotionChemical>();
for (PotionChemical chemical : oldList) {
list.add(chemical.copy());
}
for (int i = list.size() - 1; i >= 0; i--) {
if (list.get(i) == null) {
continue;
}
// spot for move
for (int j = 0; j < i; j++) {
// empty spot
if (list.get(j) == null) {
list.set(j, list.get(i));
list.set(j, null);
break;
} else // same stack
if (list.get(j).sameAs(list.get(i))) {
list.get(j).amount += list.get(i).amount;
list.set(i, null);
break;
}
}
}
list.removeAll(Collections.singleton(null));
return list;
}
Aggregations