Search in sources :

Example 1 with Molecule

use of minechem.item.molecule.Molecule 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[] {}));
    }
}
Also used : Molecule(minechem.item.molecule.Molecule) Item(net.minecraft.item.Item) ElementItem(minechem.item.element.ElementItem) SynthesisRecipe(minechem.tileentity.synthesis.SynthesisRecipe) Element(minechem.item.element.Element) DecomposerRecipeChance(minechem.tileentity.decomposer.DecomposerRecipeChance) DecomposerRecipeSelect(minechem.tileentity.decomposer.DecomposerRecipeSelect) Block(net.minecraft.block.Block) ItemBlock(net.minecraft.item.ItemBlock) PotionChemical(minechem.potion.PotionChemical) DecomposerRecipe(minechem.tileentity.decomposer.DecomposerRecipe) MoleculeEnum(minechem.item.molecule.MoleculeEnum) ItemStack(net.minecraft.item.ItemStack)

Example 2 with Molecule

use of minechem.item.molecule.Molecule in project Minechem by iopleke.

the class RadiationMoleculeHandler method toItemStacks.

private ItemStack[] toItemStacks(PotionChemical[] chemicalsArray) {
    List<ItemStack> itemStacks = new ArrayList<ItemStack>();
    List<PotionChemical> chemicals = new ArrayList<PotionChemical>(chemicalsArray.length);
    for (int i = 0; i < chemicalsArray.length; i++) {
        chemicals.add(chemicalsArray[i]);
    }
    while (!chemicals.isEmpty()) {
        int index = chemicals.size() - 1;
        PotionChemical chemical = chemicals.remove(index);
        Item thisType;
        int thisDamage;
        if (chemical instanceof Element) {
            thisType = MinechemItemsRegistration.element;
            thisDamage = ((Element) chemical).element.atomicNumber();
        } else if (chemical instanceof Molecule) {
            thisType = MinechemItemsRegistration.molecule;
            thisDamage = ((Molecule) chemical).molecule.id();
        } else {
            continue;
        }
        for (int l = 0; l < itemStacks.size(); l++) {
            if (chemical.amount <= 0) {
                break;
            }
            ItemStack stack = itemStacks.get(l);
            if (stack.getItem() == thisType && stack.getItemDamage() == thisDamage) {
                int freeSpace = 64 - stack.stackSize;
                int append = freeSpace > chemical.amount ? chemical.amount : freeSpace;
                chemical.amount -= append;
                stack.stackSize += append;
            }
        }
        if (chemical.amount > 0) {
            itemStacks.add(new ItemStack(thisType, chemical.amount, thisDamage));
        }
    }
    return itemStacks.toArray(new ItemStack[itemStacks.size()]);
}
Also used : MinechemBucketItem(minechem.item.bucket.MinechemBucketItem) Item(net.minecraft.item.Item) ElementItem(minechem.item.element.ElementItem) MoleculeItem(minechem.item.molecule.MoleculeItem) Molecule(minechem.item.molecule.Molecule) Element(minechem.item.element.Element) PotionChemical(minechem.potion.PotionChemical) ItemStack(net.minecraft.item.ItemStack)

Example 3 with Molecule

use of minechem.item.molecule.Molecule in project Minechem by iopleke.

the class Chemicals method removeMoleculeEffects.

@ZenMethod
public static void removeMoleculeEffects(IIngredient ingredient) {
    PotionChemical chemical = InputHelper.getChemical(ingredient);
    if (!(chemical instanceof Molecule)) {
        throw new IllegalArgumentException("Ingredient is not a molecule");
    }
    MineTweakerAPI.apply(new RemoveEffectsAction(((Molecule) chemical).molecule));
}
Also used : Molecule(minechem.item.molecule.Molecule) PotionChemical(minechem.potion.PotionChemical) ZenMethod(stanhebben.zenscript.annotations.ZenMethod)

Example 4 with Molecule

use of minechem.item.molecule.Molecule in project Minechem by iopleke.

the class Chemicals method addEffect.

private static void addEffect(IIngredient ingredient, PharmacologyEffect effect) {
    PotionChemical chemical = InputHelper.getChemical(ingredient);
    if (!(chemical instanceof Molecule)) {
        throw new IllegalArgumentException("Ingredient is not a molecule");
    }
    MineTweakerAPI.apply(new AddMoleculeEffectAction(((Molecule) chemical).molecule, effect));
}
Also used : Molecule(minechem.item.molecule.Molecule) PotionChemical(minechem.potion.PotionChemical)

Example 5 with Molecule

use of minechem.item.molecule.Molecule in project Minechem by iopleke.

the class RadiationMoleculeHandler method computDecayMolecule.

private Set<PotionChemical> computDecayMolecule(MoleculeEnum molecule) {
    List<PotionChemical> chemicals = molecule.components();
    Set<PotionChemical> outChemicals = new HashSet<PotionChemical>();
    if (molecule.radioactivity() == RadiationEnum.stable) {
        outChemicals.add(new Molecule(molecule));
        return outChemicals;
    }
    for (PotionChemical chemical1 : chemicals) {
        PotionChemical chemical = chemical1.copy();
        if (chemical instanceof Element) {
            Element element = (Element) chemical;
            if (element.element.radioactivity() != RadiationEnum.stable) {
                element.element = ElementEnum.getByID(element.element.atomicNumber() - 1);
            }
        } else if (chemical instanceof Molecule) {
            Molecule molecule2 = (Molecule) chemical;
            if (molecule2.molecule.radioactivity() != RadiationEnum.stable) {
                PotionChemical[] chemicals2 = getDecayedMolecule(molecule2.molecule);
                Collections.addAll(outChemicals, chemicals2);
                chemical = null;
            }
        }
        if (chemical != null) {
            outChemicals.add(chemical);
        }
    }
    return outChemicals;
}
Also used : Molecule(minechem.item.molecule.Molecule) Element(minechem.item.element.Element) PotionChemical(minechem.potion.PotionChemical)

Aggregations

Molecule (minechem.item.molecule.Molecule)8 PotionChemical (minechem.potion.PotionChemical)8 Element (minechem.item.element.Element)6 DecomposerRecipe (minechem.tileentity.decomposer.DecomposerRecipe)3 ItemStack (net.minecraft.item.ItemStack)3 ElementItem (minechem.item.element.ElementItem)2 MoleculeEnum (minechem.item.molecule.MoleculeEnum)2 DecomposerRecipeChance (minechem.tileentity.decomposer.DecomposerRecipeChance)2 DecomposerRecipeSelect (minechem.tileentity.decomposer.DecomposerRecipeSelect)2 SynthesisRecipe (minechem.tileentity.synthesis.SynthesisRecipe)2 Item (net.minecraft.item.Item)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 MinechemBucketItem (minechem.item.bucket.MinechemBucketItem)1 ElementEnum (minechem.item.element.ElementEnum)1 MoleculeItem (minechem.item.molecule.MoleculeItem)1 DecomposerRecipeSuper (minechem.tileentity.decomposer.DecomposerRecipeSuper)1 Block (net.minecraft.block.Block)1 ItemBlock (net.minecraft.item.ItemBlock)1 ZenMethod (stanhebben.zenscript.annotations.ZenMethod)1