diff --git a/src/main/java/gtPlusPlus/api/recipe/ChemicalPlantFrontend.java b/src/main/java/gtPlusPlus/api/recipe/ChemicalPlantFrontend.java index 42d1fb9f50..c03ac8e146 100644 --- a/src/main/java/gtPlusPlus/api/recipe/ChemicalPlantFrontend.java +++ b/src/main/java/gtPlusPlus/api/recipe/ChemicalPlantFrontend.java @@ -32,7 +32,7 @@ public List getItemInputPositions(int itemInputCount) { @Override public List getItemOutputPositions(int itemOutputCount) { - return UIHelper.getGridPositions(itemOutputCount, 106, 15, 2); + return UIHelper.getGridPositions(itemOutputCount, 106, 6, 2); } @Override @@ -42,7 +42,7 @@ public List getFluidInputPositions(int fluidInputCount) { @Override public List getFluidOutputPositions(int fluidOutputCount) { - return UIHelper.getGridPositions(fluidOutputCount, 142, 15, 1, fluidOutputCount); + return UIHelper.getGridPositions(fluidOutputCount, 142, 6, 1, fluidOutputCount); } @Override diff --git a/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeMaps.java b/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeMaps.java index 3977d69fe7..eb6502e5bd 100644 --- a/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeMaps.java +++ b/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeMaps.java @@ -92,7 +92,7 @@ public class GTPPRecipeMaps { ItemUtils.getItemStackFromFQRN("AdvancedSolarPanel:BlockMolecularTransformer", 1))) .build(); public static final RecipeMap chemicalPlantRecipes = RecipeMapBuilder - .of("gtpp.recipe.fluidchemicaleactor").maxIO(4, 4, 4, 2) + .of("gtpp.recipe.fluidchemicaleactor").maxIO(4, 6, 4, 3) .slotOverlays((index, isFluid, isOutput, isSpecial) -> { if (isFluid) { if (isOutput) { diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/CoalTar.java b/src/main/java/gtPlusPlus/core/item/chemistry/CoalTar.java index 7bbd78d3f5..9e718c8cc2 100644 --- a/src/main/java/gtPlusPlus/core/item/chemistry/CoalTar.java +++ b/src/main/java/gtPlusPlus/core/item/chemistry/CoalTar.java @@ -1,10 +1,15 @@ package gtPlusPlus.core.item.chemistry; +import static gregtech.api.util.GT_RecipeBuilder.SECONDS; +import static gregtech.api.util.GT_RecipeConstants.UniversalChemical; +import static gtPlusPlus.api.recipe.GTPPRecipeMaps.chemicalDehydratorRecipes; + import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; @@ -30,22 +35,15 @@ public class CoalTar extends ItemPackage { public static Fluid Naphthalene; private static void recipeEthylBenzineFuelsIntoHeavyFuel() { - CORE.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("cellFuel", 9), - ItemUtils.getItemStackOfAmountFromOreDict("cellEthylbenzene", 2), - null, - FluidUtils.getFluidStack("nitrofuel", 7500), - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 11), - 100, - 1000); - CORE.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("cellBioDiesel", 9), - ItemUtils.getItemStackOfAmountFromOreDict("cellEthylbenzene", 2), - null, - FluidUtils.getFluidStack("nitrofuel", 3000), - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 11), - 300, - 1000); + GT_Values.RA.stdBuilder().itemInputs(Materials.Fuel.getCells(9)) + .fluidInputs(FluidUtils.getFluidStack(Ethylbenzene, 2000)).itemOutputs(ItemList.Cell_Empty.get(9L)) + .fluidOutputs(Materials.NitroFuel.getFluid(7500)).duration(5 * SECONDS).eut(1000).noOptimize() + .addTo(UniversalChemical); + + GT_Values.RA.stdBuilder().itemInputs(Materials.BioDiesel.getCells(9)) + .fluidInputs(FluidUtils.getFluidStack(Ethylbenzene, 4000)).itemOutputs(ItemList.Cell_Empty.get(9L)) + .fluidOutputs(Materials.NitroFuel.getFluid(6000)).duration(5 * SECONDS).eut(1000).noOptimize() + .addTo(UniversalChemical); } public static void recipeCreateEthylene() { @@ -81,16 +79,9 @@ public static void recipeCreateEthylene() { public static void recipeCreateBenzene() { // C7H8 + 2H = CH4 + C6H6 - CORE.RA.addDehydratorRecipe( - new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellToluene", 1), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 2) }, - null, - null, - new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellMethane", 1), - ItemUtils.getItemStackOfAmountFromOreDict("cellBenzene", 1), Materials.Empty.getCells(1) }, - new int[] { 10000, 10000, 10000 }, - 20 * 10, - 90); + GT_Values.RA.stdBuilder().itemInputs(Materials.Toluene.getCells(1)).itemOutputs(Materials.Benzene.getCells(1)) + .fluidInputs(Materials.Hydrogen.getGas(2000)).fluidOutputs(Materials.Methane.getGas(1000)) + .duration(10 * SECONDS).eut(90).noOptimize().addTo(chemicalDehydratorRecipes); } public static void recipeCreateEthylbenzene() { @@ -231,13 +222,10 @@ private static void recipeCoalTarOilToSulfuricOilToNaphthalene() { private static void recipeNaphthaleneToPhthalicAcid() { // SulfuricCoalTarOil - GT_Values.RA.addChemicalRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("cellNaphthalene", 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustLithium", 5), - null, - Materials.PhthalicAcid.getFluid(2500), - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 2), - 20 * 16); + GT_Values.RA.stdBuilder().itemInputs(Materials.Lithium.getDust(5)) + .fluidInputs(FluidUtils.getFluidStack(Naphthalene, 2000)) + .fluidOutputs(Materials.PhthalicAcid.getFluid(2500)).eut(30).duration(16 * SECONDS).noOptimize() + .addTo(UniversalChemical); } private static void recipePhthalicAcidToPhthalicAnhydride() { diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java b/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java index c20fe9d522..81de187929 100644 --- a/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java +++ b/src/main/java/gtPlusPlus/core/item/chemistry/GenericChem.java @@ -7,6 +7,7 @@ import static gregtech.api.util.GT_RecipeConstants.COIL_HEAT; import static gregtech.api.util.GT_RecipeConstants.FUEL_TYPE; import static gregtech.api.util.GT_RecipeConstants.FUEL_VALUE; +import static gtPlusPlus.api.recipe.GTPPRecipeMaps.chemicalDehydratorRecipes; import net.minecraft.init.Items; import net.minecraft.item.Item; @@ -741,16 +742,10 @@ private void recipe2Ethylanthrahydroquinone() { private void recipeLithiumPeroxide() { // 2HLiO2 = Li2O2 + H2O2 - CORE.RA.addDehydratorRecipe( - new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroperoxide", 8), - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 1) }, - null, - null, - new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumPeroxide", 4), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenPeroxide", 1), }, - new int[] { 10000, 10000 }, - 20 * 100, - 120); + GT_Values.RA.stdBuilder().itemInputs(ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroperoxide", 8)) + .fluidOutputs(FluidUtils.getFluidStack("fluid.hydrogenperoxide", 1000)) + .itemOutputs(ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumPeroxide", 4)) + .duration(100 * SECONDS).eut(120).noOptimize().addTo(chemicalDehydratorRecipes); } private void recipeLithiumHydroperoxide() { diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/RocketFuels.java b/src/main/java/gtPlusPlus/core/item/chemistry/RocketFuels.java index d3705cbb9b..a64dcab0f2 100644 --- a/src/main/java/gtPlusPlus/core/item/chemistry/RocketFuels.java +++ b/src/main/java/gtPlusPlus/core/item/chemistry/RocketFuels.java @@ -138,16 +138,6 @@ private static void createLOH() { GT_Values.RA.stdBuilder().itemInputs(ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 1)) .itemOutputs(ItemUtils.getItemStackOfAmountFromOreDict("cellLiquidHydrogen", 1)).duration(16 * SECONDS) .eut(TierEU.RECIPE_MV).addTo(vacuumFreezerRecipes); - - CORE.RA.addAdvancedFreezerRecipe( - new ItemStack[] {}, - new FluidStack[] { FluidUtils.getFluidStack("hydrogen", 300) }, - new FluidStack[] { FluidUtils.getFluidStack(Liquid_Hydrogen, 300) }, - new ItemStack[] {}, - new int[] {}, - 20 * 4, - 540, - 0); } private static void createHydratedAmmoniumNitrateSlurry() { diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index 7d30cba8f0..373238df3b 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -1550,20 +1550,6 @@ private static void cyclotronRecipes() { 2500); // Generate Hydrogen Plasma Recipe - CORE.RA.addCyclotronRecipe( - new ItemStack[] { Particle.getIon("Hydrogen", 0), - ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 1) }, - null, - new ItemStack[] { Particle.getBaseParticle(Particle.PROTON), Particle.getBaseParticle(Particle.NEUTRON), - Particle.getBaseParticle(Particle.ELECTRON), Particle.getBaseParticle(Particle.UNKNOWN), - Particle.getBaseParticle(Particle.UNKNOWN), Particle.getBaseParticle(Particle.UNKNOWN), - CI.emptyCells(1) }, - FluidUtils.getFluidStack("plasma.hydrogen", 100), - new int[] { 1250, 1250, 1250, 750, 750, 750, 10000 }, - 20 * 60 * 2, - (int) MaterialUtils.getVoltageForTier(6), - 750 * 20); - CORE.RA.addCyclotronRecipe( new ItemStack[] { CI.getNumberedCircuit(21), Particle.getIon("Hydrogen", 0), }, FluidUtils.getFluidStack("hydrogen", 1000), diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_RareEarthProcessing.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_RareEarthProcessing.java index 1678532ac3..ace004653a 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_RareEarthProcessing.java +++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_RareEarthProcessing.java @@ -8,6 +8,7 @@ import static gregtech.api.util.GT_RecipeBuilder.SECONDS; import static gtPlusPlus.core.material.MISC_MATERIALS.BRINE; import static gtPlusPlus.core.material.MISC_MATERIALS.HYDROGEN_CHLORIDE; +import static gtPlusPlus.core.material.MISC_MATERIALS.HYDROGEN_CHLORIDE_MIX; import static gtPlusPlus.core.material.MISC_MATERIALS.RARE_EARTH_HIGH; import static gtPlusPlus.core.material.MISC_MATERIALS.RARE_EARTH_LOW; import static gtPlusPlus.core.material.MISC_MATERIALS.RARE_EARTH_MID; @@ -76,12 +77,10 @@ public static void init() { .itemOutputs(ItemUtils.getSimpleStack(ModItems.cellHydrogenChlorideMix, 2)).duration(10 * SECONDS) .eut(TierEU.RECIPE_HV).addTo(mixerRecipes); - GT_Values.RA.stdBuilder() - .itemInputs( - ItemUtils.getSimpleStack(ModItems.cellHydrogenChlorideMix, 4), - GregtechItemList.Laser_Lens_WoodsGlass.get(0)) - .itemOutputs(ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 4)) - .duration(30 * SECONDS).eut(TierEU.RECIPE_HV).noOptimize().addTo(laserEngraverRecipes); + GT_Values.RA.stdBuilder().itemInputs(GregtechItemList.Laser_Lens_WoodsGlass.get(0)) + .fluidInputs(HYDROGEN_CHLORIDE_MIX.getFluidStack(4000)) + .fluidOutputs(HYDROGEN_CHLORIDE.getFluidStack(4000)).duration(30 * SECONDS).eut(TierEU.RECIPE_HV) + .noOptimize().addTo(laserEngraverRecipes); // Set Material Tiers correctly ORES.GREENOCKITE.vTier = 1; diff --git a/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java b/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java index 692e6d4e76..515c4ca8b8 100644 --- a/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java +++ b/src/main/java/gtPlusPlus/plugin/agrichem/BioRecipes.java @@ -18,6 +18,8 @@ import static gregtech.api.util.GT_RecipeConstants.FUEL_TYPE; import static gregtech.api.util.GT_RecipeConstants.FUEL_VALUE; import static gregtech.api.util.GT_RecipeConstants.UniversalChemical; +import static gtPlusPlus.api.recipe.GTPPRecipeMaps.chemicalDehydratorRecipes; +import static gtPlusPlus.api.recipe.GTPPRecipeMaps.chemicalPlantRecipes; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -443,15 +445,11 @@ private static void recipeAceticAcid() { 60, 1); - CORE.RA.addDehydratorRecipe( - new ItemStack[] { CI.getNumberedBioCircuit(14), CI.emptyCells(1) }, - FluidUtils.getFluidStack(mFermentationBase, 1000), - null, - new ItemStack[] { ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 2), - ItemUtils.getItemStackOfAmountFromOreDict("cellAceticAcid", 1) }, - new int[] { 10000, 10000 }, - 60 * 20, - 16); + GT_Values.RA.stdBuilder().itemInputs(CI.getNumberedBioCircuit(14)) + .fluidInputs(FluidUtils.getFluidStack(mFermentationBase, 1000)) + .fluidOutputs(FluidUtils.getFluidStack(mAceticAcid, 1000)) + .itemOutputs(ItemUtils.getSimpleStack(AgriculturalChem.mCompost, 2)).duration(60 * SECONDS).eut(16) + .noOptimize().addTo(chemicalDehydratorRecipes); } public static final HashSet mFruits = new HashSet<>(); @@ -581,18 +579,17 @@ private static void recipeFermentationBase() { } // Produce Acetone, Butanol and Ethanol - CORE.RA.addChemicalPlantRecipe( - new ItemStack[] { getBioChip(5), ItemUtils.getItemStackOfAmountFromOreDict("cellFermentationBase", 48), + GT_Values.RA.stdBuilder() + .itemInputs( + getBioChip(5), ItemUtils.getSimpleStack(AgriculturalChem.mGoldenBrownCelluloseFiber, 6), - ItemUtils.getSimpleStack(AgriculturalChem.mRedCelluloseFiber, 16), }, - new FluidStack[] {}, - new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellButanol", 18), - ItemUtils.getItemStackOfAmountFromOreDict("cellAcetone", 9), - ItemUtils.getItemStackOfAmountFromOreDict("cellEthanol", 3), CI.emptyCells(18) }, - new FluidStack[] {}, - 100 * 20, - 32, - 1); + ItemUtils.getSimpleStack(AgriculturalChem.mRedCelluloseFiber, 16)) + .fluidInputs(FluidUtils.getFluidStack(BioRecipes.mFermentationBase, 48000)) + .fluidOutputs( + FluidUtils.getFluidStack(BioRecipes.mButanol, 18000), + FluidUtils.getFluidStack(BioRecipes.mAcetone, 9000), + FluidUtils.getFluidStack(BioRecipes.mEthanol, 3000)) + .duration(100 * SECONDS).eut(32).specialValue(1).noOptimize().addTo(chemicalPlantRecipes); } private static void recipePropionicAcid() { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java index ccb6b76539..04f7c36077 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java @@ -6,6 +6,7 @@ import static gregtech.api.util.GT_RecipeBuilder.SECONDS; import static gregtech.api.util.GT_RecipeBuilder.TICKS; import static gregtech.api.util.GT_RecipeConstants.FUSION_THRESHOLD; +import static gtPlusPlus.api.recipe.GTPPRecipeMaps.chemicalDehydratorRecipes; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -293,19 +294,15 @@ private static void chemicalReactorRecipes() { private static void dehydratorRecipes() { // Makes 7-Lithium - CORE.RA.addDehydratorRecipe( - new ItemStack[] { CI.getNumberedAdvancedCircuit(14), - ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricLithium", 1) }, - FluidUtils.getFluidStack("sulfuriclithium", 440), - null, - new ItemStack[] { CI.emptyCells(1), ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 3), + GT_Values.RA.stdBuilder().itemInputs(CI.getNumberedAdvancedCircuit(14)) + .fluidInputs(FluidUtils.getFluidStack("sulfuriclithium", 1440)) + .itemOutputs( + ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 3), ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustSodium", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 4) }, - new int[] { 10000, 10000, 10000, 10000, 10000 }, - 30 * 20, - 30); + ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 4)) + .duration(30 * SECONDS).eut(30).addTo(chemicalDehydratorRecipes); // Makes Lithium Carbonate CORE.RA.addDehydratorRecipe( diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java index 4fafaf25e3..fa3d2f36cc 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java @@ -34,15 +34,17 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { @Override public boolean addCokeOvenRecipe(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput, final FluidStack aFluidOutput, final ItemStack aOutput, int aDuration, final int aEUt) { - if (aInput1 == null || (aOutput == null || aFluidOutput == null)) { + if (aInput1 == null || (aOutput == null && aFluidOutput == null)) { Logger.WARNING("Something was null, returning false"); return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aOutput, aDuration)) <= 0) { + if (aOutput != null && (aDuration = GregTech_API.sRecipeFile.get("cokeoven", aOutput, aDuration)) <= 0) { Logger.WARNING("Something was null, returning false"); return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aFluidOutput.getFluid().getName(), aDuration)) <= 0) { + if (aFluidOutput != null + && (aDuration = GregTech_API.sRecipeFile.get("cokeoven", aFluidOutput.getFluid().getName(), aDuration)) + <= 0) { Logger.WARNING("Something was null, returning false"); return false; } @@ -857,7 +859,7 @@ public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFl @Override public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int[] aChances, int time, long eu, int aTier) { - if (aInputs.length > 4 || aInputFluids.length > 4 || aOutputs.length > 4 || aFluidOutputs.length > 2) { + if (aInputs.length > 4 || aInputFluids.length > 4 || aOutputs.length > 6 || aFluidOutputs.length > 3) { Logger.INFO("Inputs: " + ItemUtils.getArrayStackNames(aInputs)); Logger.INFO("Fluid Inputs: " + ItemUtils.getArrayStackNames(aInputFluids)); Logger.INFO("Outputs: " + ItemUtils.getArrayStackNames(aOutputs));