aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/recipes
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2021-12-15 16:11:54 +0100
committerGitHub <noreply@github.com>2021-12-15 16:11:54 +0100
commit128c74faa99dfef8d056c1d82c6e4388b9d470e8 (patch)
tree2c84162154ba681232f86dffd4106db530236814 /src/Java/gtPlusPlus/xmod/gregtech/recipes
parent47ce336f288a45aa3244c8ae1177499fa5080942 (diff)
parentff4b8c7068c2ea7d654e9beda00646d23e62b314 (diff)
downloadGT5-Unofficial-128c74faa99dfef8d056c1d82c6e4388b9d470e8.tar.gz
GT5-Unofficial-128c74faa99dfef8d056c1d82c6e4388b9d470e8.tar.bz2
GT5-Unofficial-128c74faa99dfef8d056c1d82c6e4388b9d470e8.zip
Merge pull request #65 from GTNewHorizons/unified-build-script2
Move sources and resources
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/recipes')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java1851
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java57
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_AssemblyLine.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java47
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java82
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java55
6 files changed, 0 insertions, 2112 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
deleted file mode 100644
index be4d6a8f7d..0000000000
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ /dev/null
@@ -1,1851 +0,0 @@
-package gtPlusPlus.xmod.gregtech.recipes;
-
-import static gregtech.GT_Mod.GT_FML_LOGGER;
-import static gtPlusPlus.core.lib.CORE.GTNH;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Materials;
-import gregtech.api.interfaces.internal.IGT_RecipeAdder;
-import gregtech.api.util.*;
-import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map;
-import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.lib.LoadedMods;
-import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.material.MaterialGenerator;
-import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.data.ArrayUtils;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.minecraft.MaterialUtils;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
-import gtPlusPlus.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder;
-import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy_RTG;
-import gtPlusPlus.xmod.gregtech.common.StaticFields59;
-import gtPlusPlus.xmod.gregtech.common.helpers.FlotationRecipeHandler;
-import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntity_RTG;
-import gtPlusPlus.xmod.gregtech.recipes.machines.RECIPEHANDLER_MatterFabricator;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.oredict.OreDictionary;
-
-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) {
- try {
- try {
- // RECIPEHANDLER_CokeOven.debug1();
- if (((aInput1 == null) /* && (aFluidInput == null) */)
- || ((aOutput == null) || (aFluidOutput == null))) {
- // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+"
- // aInput2:"+aInput2.toString()+"
- // aFluidInput:"+aFluidInput.toString()+"
- // aFluidOutput:"+aFluidOutput.toString()+"
- // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+"
- // aEU/t:"+aEUt);
- Logger.WARNING("Something was null, returning false");
- return false;
- }
-
- }
- catch (final NullPointerException e) {
- e.getStackTrace();
- }
- try {
- // RECIPEHANDLER_CokeOven.debug2(aInput1, aInput2, aFluidInput,
- // aFluidOutput, aOutput, aDuration, aEUt);
- if ((aOutput != null)
- && ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aOutput, aDuration)) <= 0)) {
- // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+"
- // aInput2:"+aInput2.toString()+"
- // aFluidInput:"+aFluidInput.toString()+"
- // aFluidOutput:"+aFluidOutput.toString()+"
- // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+"
- // aEU/t:"+aEUt);
- Logger.WARNING("Something was null, returning false");
- return false;
- }
-
- }
- catch (final NullPointerException e) {
- e.getStackTrace();
- }
- try {
- // RECIPEHANDLER_CokeOven.debug3(aInput1, aInput2, aFluidInput,
- // aFluidOutput, aOutput, aDuration, aEUt);
- if ((aFluidOutput == null) || ((aDuration = GregTech_API.sRecipeFile.get("cokeoven",
- aFluidOutput.getFluid().getName(), aDuration)) <= 0)) {
- // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+"
- // aInput2:"+aInput2.toString()+"
- // aFluidInput:"+aFluidInput.toString()+"
- // aFluidOutput:"+aFluidOutput.toString()+"
- // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+"
- // aEU/t:"+aEUt);
- Logger.WARNING("Something was null, returning false");
- return false;
- }
-
- }
- catch (final NullPointerException e) {
- e.getStackTrace();
- }
- try {
-
- GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
- true,
- new ItemStack[] { aInput1, aInput2 },
- new ItemStack[] { aOutput },
- null,
- new int[] {},
- new FluidStack[] { aFluidInput },
- new FluidStack[] { aFluidOutput },
- Math.max(1, aDuration),
- Math.max(1, aEUt),
- 0);
-
- int aSize = GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size();
- int aSize2 = aSize;
- GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.add(aSpecialRecipe);
- aSize = GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size();
-
-
- // RECIPEHANDLER_CokeOven.debug4(aInput1, aInput2, aFluidInput,
- // aFluidOutput, aOutput, aDuration, aEUt);
- /*if (aFluidInput == null && aInput2 != null) {
- GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1, aInput2 },
- new ItemStack[] { aOutput }, null, null, null, new FluidStack[] { aFluidOutput }, aDuration,
- aEUt, 0);
- }
- else if (aFluidInput == null && aInput2 == null) {
- GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1 },
- new ItemStack[] { aOutput }, null, null, null, new FluidStack[] { aFluidOutput }, aDuration,
- aEUt, 0);
- }
- else {
- GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1, aInput2 },
- new ItemStack[] { aOutput }, null, null, new FluidStack[] { aFluidInput },
- new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);
- }*/
- // RECIPEHANDLER_CokeOven.debug5(aInput1, aInput2, aFluidInput,
- // aFluidOutput, aOutput, aDuration, aEUt);
-
- return aSize > aSize2;
-
- }
- catch (final NullPointerException e) {
- Logger.WARNING("Something was null, returning false");
- return false;
- }
- }
- catch (final Throwable e) {
- // Logger.WARNING("aInput1:"+aInput1.toString()+"
- // aInput2:"+aInput2.toString()+"
- // aFluidInput:"+aFluidInput.toString()+"
- // aFluidOutput:"+aFluidOutput.toString()+"
- // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+"
- // aEU/t:"+aEUt);
- Logger.WARNING("Failed.");
- e.getStackTrace();
- return false;
- }
- }
-
-
- @Override
- public boolean addCokeOvenRecipe(int aCircuit, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt) {
- return addCokeOvenRecipe(CI.getNumberedCircuit(aCircuit), aInput2, aFluidInputs, aFluidOutputs, aOutputs, aDuration, aEUt);
- }
-
- @Override
- public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt) {
- GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
- true,
- new ItemStack[] { aInput1, aInput2 },
- aOutputs,
- null,
- new int[] {},
- aFluidInputs,
- aFluidOutputs,
- Math.max(1, aDuration),
- Math.max(1, aEUt),
- 0);
- int aSize = GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size();
- GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.add(aSpecialRecipe);
- return GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size() > aSize;
- }
-
- @Override
- public boolean addMatterFabricatorRecipe(final FluidStack aFluidInput, final FluidStack aFluidOutput,
- final int aDuration, final int aEUt) {
- try {
- try {
- // RECIPEHANDLER_MatterFabricator.debug1();
- if (aFluidOutput == null) {
- // Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+"
- // aFluidOutput:"+aFluidOutput.toString()+"
- // aDuration:"+aDuration+" aEU/t:"+aEUt);
- Logger.WARNING("Something was null, returning false");
- return false;
- }
-
- }
- catch (final NullPointerException e) {
- e.getStackTrace();
- }
- try {
-
- // RECIPEHANDLER_MatterFabricator.debug4(aFluidInput,
- // aFluidOutput, aDuration, aEUt);
- if (aFluidInput == null) {
- // Recipe_GT.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true,
- // null, new FluidStack[]{aFluidOutput}, aDuration, aEUt,
- // 0);
-
- GTPP_Recipe aRecipe = new GTPP_Recipe(
- false,
- new ItemStack[] {},
- new ItemStack[] {},
- null,
- new int[] {},
- new FluidStack[] {},
- new FluidStack[] {aFluidOutput},
- aDuration,
- aEUt,
- 0);
- GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.addRecipe(aRecipe);
- }
- else {
- // Recipe_GT.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true,
- // new FluidStack[]{aFluidInput}, new
- // FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
- GTPP_Recipe aRecipe = new GTPP_Recipe(
- false,
- new ItemStack[] {},
- new ItemStack[] {},
- null,
- new int[] {},
- new FluidStack[] {aFluidInput},
- new FluidStack[] {aFluidOutput},
- aDuration,
- aEUt,
- 0);
- GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.addRecipe(aRecipe);
- }
- RECIPEHANDLER_MatterFabricator.debug5(aFluidInput, aFluidOutput, aDuration, aEUt);
-
- return true;
-
- }
- catch (final NullPointerException e) {
- return false;
- }
- }
- catch (final Throwable e) {
- // Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+"
- // aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+"
- // aEU/t:"+aEUt);
- Logger.WARNING("Failed.");
- e.getStackTrace();
- return false;
- }
- }
-
- @Override
- public boolean addMatterFabricatorRecipe(final ItemStack aInputStack, final FluidStack aFluidInput,
- final FluidStack aFluidOutput, final int aDuration, final int aEUt) {
- try {
- try {
- if ((aFluidOutput == null) || (aInputStack == null)) {
- return false;
- }
- }
- catch (final NullPointerException e) {
- }
- try {
- if (aFluidInput == null) {
- GTPP_Recipe aRecipe = new GTPP_Recipe(
- false,
- new ItemStack[] { aInputStack },
- new ItemStack[] {},
- null,
- new int[] {},
- new FluidStack[] {},
- new FluidStack[] {aFluidOutput},
- aDuration,
- aEUt,
- 0);
- GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.addRecipe(aRecipe);
- }
- else {
- GTPP_Recipe aRecipe = new GTPP_Recipe(
- false,
- new ItemStack[] { aInputStack },
- new ItemStack[] {},
- null,
- new int[] {},
- new FluidStack[] {aFluidInput},
- new FluidStack[] {aFluidOutput},
- aDuration,
- aEUt,
- 0);
- GTPP_Recipe.GTPP_Recipe_Map.sMatterFab2Recipes.addRecipe(aRecipe);
- }
- RECIPEHANDLER_MatterFabricator.debug5(aFluidInput, aFluidOutput, aDuration, aEUt);
- return true;
- }
- catch (final NullPointerException e) {
- return false;
- }
- }
- catch (final Throwable e) {
- return false;
- }
- }
-
- @Override
- public boolean addFuel(final ItemStack aInput1, final ItemStack aOutput1, final int aEU, final int aType) {
- if (aInput1 == null) {
- Logger.WARNING("Fuel Input is Invalid.");
- return false;
- }
- // new GregtechRecipe(aInput1, aOutput1,
- // GregTech_API.sRecipeFile.get("fuel_" + aType, aInput1, aEU), aType);
- return true;
- }
-
- /*
- * @Override public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack
- * aItemB, FluidStack aFluid, ItemStack[] aOutputItems, FluidStack
- * aOutputFluid, int aDuration, int aEUt) { if ((aItemA == null) || (aItemB
- * == null) || (aOutputItems == null)) { return false; } for (ItemStack
- * tStack : aOutputItems) { if (tStack != null) { if ((aDuration =
- * GregTech_API.sRecipeFile.get("dehydrator", aItemA, aDuration)) <= 0) {
- * return false; }
- * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true,
- * new ItemStack[]{aItemA, aItemB}, aOutputItems, null, null, null,
- * aDuration, aEUt, 0); RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB,
- * aFluid, aOutputFluid, aOutputItems, aDuration, aEUt); return true; } }
- * return false; }
- * @Override public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack
- * aItemB, ItemStack[] aOutputItems, int aDuration, int aEUt) { if ((aItemA
- * == null) || (aItemB == null) || (aOutputItems == null)) { return false; }
- * if ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aItemA,
- * aDuration)) <= 0) { return false; }
- * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true,
- * new ItemStack[]{aItemA, aItemB}, aOutputItems, null, null, null,
- * aDuration, aEUt, 0); RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB,
- * null, null, aOutputItems, aDuration, aEUt); return true; }
- * @Override public boolean addDehydratorRecipe(FluidStack aFluid,
- * FluidStack aOutputFluid, ItemStack[] aOutputItems, int aDuration, int
- * aEUt){ if ((aFluid == null) || (aOutputFluid == null || aOutputItems ==
- * null)) { return false; } if ((aDuration =
- * GregTech_API.sRecipeFile.get("dehydrator", aFluid.getUnlocalizedName(),
- * aDuration)) <= 0) { return false; }
- * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true,
- * null, aOutputItems, null, new FluidStack[]{aFluid}, new
- * FluidStack[]{aOutputFluid}, aDuration, aEUt, 0);
- * RECIPEHANDLER_Dehydrator.debug5(null, null, aFluid, aOutputFluid,
- * aOutputItems, aDuration, aEUt); return true; }
- */
-
- /*@Override
- public boolean addDehydratorRecipe(final ItemStack aInput, final FluidStack aFluid, final ItemStack[] aOutput,
- int aDuration, final int aEUt) {
- Logger.WARNING("Trying to add a Dehydrator recipe.");
- try {
- if ((aInput == null) || (aFluid == null) || (aOutput == null)) {
- return false;
- }
- if ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aInput, aDuration)) <= 0) {
- return false;
- }
- GTPP_Recipe aRecipe = new GTPP_Recipe(
- false,
- new ItemStack[] { aInput },
- aOutput,
- null,
- new int[] {},
- new FluidStack[] { aFluid },
- new FluidStack[] {},
- aDuration,
- aEUt,
- 0);
- GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(aRecipe);
- // RECIPEHANDLER_Dehydrator.debug5(aInput, null, aFluid, null,
- // aOutput, aDuration, aEUt);
- return true;
- }
- catch (final NullPointerException e) {
- Logger.WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");
- return false;
- }
- }*/
-
- @Override
- public boolean addDehydratorRecipe(final ItemStack[] aInput, final FluidStack aFluidInput,
- final FluidStack aFluidOutput, final ItemStack[] aOutputItems, final int[] aChances, int aDuration,
- final int aEUt) throws IndexOutOfBoundsException {
- Logger.WARNING("Trying to add a Dehydrator recipe.");
- try {
- if (aInput != null && aInput.length > 0) {
- if (aInput[0] != null) {
- Logger.WARNING("Recipe requires input: " + aInput[0].getDisplayName() + " x" + aInput[0].stackSize);
- }
- if (aInput.length > 1) {
- if (aInput[1] != null) {
- Logger.WARNING("Recipe requires input: " + aInput[1].getDisplayName() + " x" + aInput[1].stackSize);
- }
- }
- }
- if (aFluidInput != null) {
- Logger.WARNING("Recipe requires input: " + aFluidInput.getFluid().getName() + " " + aFluidInput.amount
- + "mbs");
- }
- if (((aInput == null || aInput.length == 0) && (aFluidInput == null)) || ((aOutputItems == null || aOutputItems.length == 0) && (aFluidOutput == null))) {
- return false;
- }
- if (aOutputItems != null) {
- Logger.WARNING("Recipe will output: " + ItemUtils.getArrayStackNames(aOutputItems));
- }
- if (aFluidOutput != null) {
- Logger.WARNING("Recipe will output: " + aFluidOutput.getFluid().getName());
- }
-
- GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
- true,
- aInput,
- aOutputItems,
- null,
- aChances,
- new FluidStack[] { aFluidInput },
- new FluidStack[] { aFluidOutput },
- Math.max(1, aDuration),
- Math.max(1, aEUt),
- 0);
-
- int aSize = GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.mRecipeList.size();
- int aSize2 = aSize;
- GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.add(aSpecialRecipe);
- aSize = GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.mRecipeList.size();
-
- /*if (aInput.length == 1) {
- Logger.WARNING("Dehydrator recipe only has a single input item.");
- GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null,
- aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt,
- 0);
-
- }
- else {
- Logger.WARNING("Dehydrator recipe has two input items.");
- GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null,
- aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt,
- 0);
- }*/
-
- return aSize > aSize2;
- }
- catch (final NullPointerException e) {
- Logger.WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");
- return false;
- }
- }
-
- @Override
- public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aOutput, final int aChance, int aDuration,
- final int aEUt) {
- return addBlastSmelterRecipe(aInput, null, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, 3700);
- }
-
- @Override
- public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput,
- final int aChance, int aDuration, final int aEUt) {
- return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, 3700);
- }
-
- @Override
- public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack,
- final int aChance[], int aDuration, final int aEUt) {
- return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, aOutputStack, aChance, aDuration, aEUt, 3700);
- }
-
- @Override
- public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance,
- int aDuration, int aEUt, int aSpecialValue) {
- return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, aSpecialValue);
- }
-
- @Override
- public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int[] aChance,
- int aDuration, int aEUt, int aSpecialValue) {
- if ((aInput == null) || (aOutput == null)) {
- Logger.WARNING("Fail - Input or Output was null.");
- return false;
- }
-
- if (aOutput.isFluidEqual(Materials.PhasedGold.getMolten(1))) {
- aOutput = Materials.VibrantAlloy.getMolten(aOutput.amount);
- }
- if (aOutput.isFluidEqual(Materials.PhasedIron.getMolten(1))) {
- aOutput = Materials.PulsatingIron.getMolten(aOutput.amount);
- }
- if ((aDuration = GregTech_API.sRecipeFile.get("blastsmelter", aOutput.getFluid().getName(), aDuration)) <= 0) {
- Logger.WARNING("Recipe did not register.");
- return false;
- }
-
- for (int das = 0; das < aInput.length; das++) {
- if (aInput[das] != null) {
- Logger.WARNING("tMaterial[" + das + "]: " + aInput[das].getDisplayName() + ", Amount: "
- + aInput[das].stackSize);
- }
- }
-
- ArrayUtils.removeNulls(aInput);
- if (aInput.length <= 1) {
- return false;
- }
- GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
- true,
- aInput,
- aOutputStack,
- null,
- aChance,
- new FluidStack[] { aInputFluid },
- new FluidStack[] { aOutput },
- Math.max(1, aDuration),
- Math.max(1, aEUt),
- aSpecialValue);
-
- int aSize = GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mRecipeList.size();
- int aSize2 = aSize;
- GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.add(aSpecialRecipe);
- aSize = GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mRecipeList.size();
-
-
- /*GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.addRecipe(true, aInput, aOutputStack, null,
- aChance, new FluidStack[] { aInputFluid }, new FluidStack[] { aOutput }, aDuration, aEUt,
- aSpecialValue);*/
-
- return aSize > aSize2;
- }
-
- @Override
- public boolean addLFTRRecipe(final ItemStack aInput1, final FluidStack aInput2, final ItemStack aOutput1,
- final FluidStack aOutput2, final int aDuration, final int aEUt) {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public boolean addLFTRRecipe(final ItemStack aInput1, final ItemStack aInput2, final ItemStack aOutput1,
- final int aDuration, final int aEUt) {
- return false;
- }
-
- @Override
- public boolean addLFTRRecipe(final FluidStack aInput1, final FluidStack aInput2, final FluidStack aOutput1,
- final int aDuration, final int aEUt) {
- if ((aInput1 == null) || (aInput2 == null) || (aOutput1 == null) || (aDuration < 1) || (aEUt < 1)) {
- return false;
- }
- GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.addRecipe(null,
- new FluidStack[] { aInput1, aInput2 }, new FluidStack[] { aOutput1 }, aDuration, aEUt, 16000);
- return true;
- }
-
- @Override
- public boolean addFissionFuel(final FluidStack aInput1, final FluidStack aInput2, final FluidStack aInput3,
- final FluidStack aInput4, final FluidStack aInput5, final FluidStack aInput6, final FluidStack aInput7,
- final FluidStack aInput8, final FluidStack aInput9, final FluidStack aOutput1, final FluidStack aOutput2,
- final int aDuration, final int aEUt) {
- return addFissionFuel(false, aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9, aOutput1, aOutput2, aDuration, aEUt);
- }
-
- @Override
- public boolean addFissionFuel(final boolean aOptimise, final FluidStack aInput1, final FluidStack aInput2, final FluidStack aInput3,
- final FluidStack aInput4, final FluidStack aInput5, final FluidStack aInput6, final FluidStack aInput7,
- final FluidStack aInput8, final FluidStack aInput9, final FluidStack aOutput1, final FluidStack aOutput2,
- final int aDuration, final int aEUt) {
-
- if ((aInput1 == null) || (aOutput1 == null) || (aDuration < 1) || (aEUt < 1)) {
- return false;
- }
- final FluidStack inputs[] = { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 };
- final FluidStack outputs[] = { aOutput1, aOutput2 };
-
- GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
- aOptimise,
- new ItemStack[] {},
- new ItemStack[] {},
- null,
- new int[] {},
- inputs,
- outputs,
- Math.max(1, aDuration),
- Math.max(1, aEUt),
- 0);
-
- int aSize = GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.mRecipeList.size();
- int aSize2 = aSize;
- GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.add(aSpecialRecipe);
- aSize = GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.mRecipeList.size();
-
- if (aSize > aSize2) {
- Logger.INFO("Added Nuclear Fuel Recipe.");
- return true;
- }
- return false;
- }
-
- @Override
- public boolean addCyclotronRecipe(ItemStack aInputs, FluidStack aFluidInput, ItemStack[] aOutputs,
- FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) {
- return addCyclotronRecipe(new ItemStack[] {aInputs}, aFluidInput, aOutputs, aFluidOutput, aChances, aDuration, aEUt, aSpecialValue);
- }
-
- @Override
- public boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack[] aOutput,
- FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) {
- if (aOutput == null || aOutput.length < 1 || !ItemUtils.checkForInvalidItems(aOutput)) {
- Logger.INFO("Bad output for Cyclotron Recipe.");
- return false;
- }
-
- GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
- true,
- aInputs,
- aOutput,
- null,
- aChances,
- new FluidStack[] { aFluidInput },
- new FluidStack[] { aFluidOutput },
- Math.max(1, aDuration),
- Math.max(1, aEUt),
- aSpecialValue);
-
- int aSize = GTPP_Recipe.GTPP_Recipe_Map.sCyclotronRecipes.mRecipeList.size();
- int aSize2 = aSize;
- GTPP_Recipe.GTPP_Recipe_Map.sCyclotronRecipes.add(aSpecialRecipe);
- aSize = GTPP_Recipe.GTPP_Recipe_Map.sCyclotronRecipes.mRecipeList.size();
-
- if (aSize > aSize2) {
- Logger.INFO("Added Cyclotron Recipe.");
- return true;
- }
-
- Logger.INFO("Failed to add Cyclotron Recipe. Output: "+ItemUtils.getArrayStackNames(aOutput));
- return false;
- }
-
- @Override
- public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4,
- FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3,
- ItemStack aOutput4, int aDuration, int aEUt) {
- if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) {
- return false;
- }
- if ((aOutput1 != null)
- && ((aDuration = GregTech_API.sRecipeFile.get("advancedmixer", aOutput1, aDuration)) <= 0)) {
- return false;
- }
- if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("advancedmixer",
- aFluidOutput.getFluid().getName(), aDuration)) <= 0)) {
- return false;
- }
- GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
- true,
- new ItemStack[] { aInput1, aInput2, aInput3, aInput4 },
- new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 },
- null,
- new int[] {},
- new FluidStack[] { aFluidInput },
- new FluidStack[] { aFluidOutput },
- Math.max(1, aDuration),
- Math.max(1, aEUt),
- 0);
-
- int aSize = GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.mRecipeList.size();
- int aSize2 = aSize;
- GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.add(aSpecialRecipe);
- aSize = GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.mRecipeList.size();
-
- /*GTPP_Recipe.GTPP_Recipe_Map.sAdvancedMixerRecipes.addRecipe(true,
- new ItemStack[] { aInput1, aInput2, aInput3, aInput4 },
- new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, null, null,
- new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);*/
-
- return aSize > aSize2;
- }
-
- // Machine Component Assembler
- @Override
- public boolean addComponentMakerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1,
- int aDuration, int aEUt) {
- if (areItemsAndFluidsBothNull(aInputs, new FluidStack[] { aFluidInput })) {
- return false;
- }
- if (aOutput1 == null) {
- return false;
- }
- if ((aDuration = GregTech_API.sRecipeFile.get("machinecomponents", aOutput1, aDuration)) <= 0) {
- return false;
- }
- if (GTNH) {
- return false;
- }
- GTPP_Recipe aRecipe = new GTPP_Recipe(
- false,
- aInputs,
- new ItemStack[] { aOutput1 },
- null,
- new int[] {},
- new FluidStack[] {aFluidInput},
- new FluidStack[] {},
- aDuration,
- aEUt,
- 0);
- GTPP_Recipe.GTPP_Recipe_Map.sComponentAssemblerRecipes.addRecipe(aRecipe);
- return true;
- }
-
-
- public boolean addMultiblockCentrifugeRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){
- if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) {
- return false;
- }
-
- if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) {
- Logger.INFO("[Recipe] Error generating Large Centrifuge recipe.");
- Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs));
- Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs));
- Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs));
- Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
- return false;
- }
-
- GTPP_Recipe aRecipe = new GTPP_Recipe(
- false,
- aInputs,
- aOutputs,
- null,
- aChances,
- aFluidInputs,
- aFluidOutputs,
- aDuration,
- aEUtick,
- aSpecial);
- GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.addRecipe(aRecipe);
-
- //GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial);
- return true;
- }
-
- public boolean addMultiblockElectrolyzerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){
- if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) {
- return false;
- }
- if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) {
- Logger.INFO("[Recipe] Error generating Large Electrolyzer recipe.");
- Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs));
- Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs));
- Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs));
- Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
- return false;
- }
-
- GTPP_Recipe aRecipe = new GTPP_Recipe(
- false,
- aInputs,
- aOutputs,
- null,
- aChances,
- aFluidInputs,
- aFluidOutputs,
- aDuration,
- aEUtick,
- aSpecial);
- GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.addRecipe(aRecipe);
- //GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial);
- return true;
- }
-
-
- public boolean addAdvancedFreezerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial) {
- if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) {
- return false;
- }
-
- if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) {
- Logger.INFO("[Recipe] Error generating Adv. Vac Freezer recipe.");
- Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs));
- Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs));
- Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs));
- Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
- return false;
- }
-
- GTPP_Recipe aRecipe = new GTPP_Recipe(
- false,
- aInputs,
- aOutputs,
- null,
- aChances,
- aFluidInputs,
- aFluidOutputs,
- aDuration,
- aEUtick,
- aSpecial);
- GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT.addRecipe(aRecipe);
- /*if (GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial) != null) {
- return true;
- }*/
- return false;
-
- }
-
- public boolean addMultiblockMixerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){
- if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) {
- return false;
- }
- if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) {
- Logger.INFO("[Recipe] Error generating Large Mixer recipe.");
- Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs));
- Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs));
- Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs));
- Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
- return false;
- }
-
- GTPP_Recipe aRecipe = new GTPP_Recipe(
- false,
- aInputs,
- aOutputs,
- null,
- aChances,
- aFluidInputs,
- aFluidOutputs,
- aDuration,
- aEUtick,
- aSpecial);
- GTPP_Recipe.GTPP_Recipe_Map.sMultiblockMixerRecipes_GT.addRecipe(aRecipe);
- return true;
- }
-
- public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, ItemStack aOutput, int a1, int a2) {
- if (aInput1 instanceof String || aInput2 instanceof String) {
- int mCompleted = 0;
- if (aInput1 instanceof String && aInput2 instanceof String) {
- List<ItemStack> x = OreDictionary.getOres((String) aInput1, false);
- List<ItemStack> x1 = OreDictionary.getOres((String) aInput2, false);
- if (x != null && x.size() > 0 && x1 != null && x1.size() > 0) {
- for (ItemStack r : x) {
- r.stackSize = aAmount1;
- for (ItemStack r1 : x1) {
- r1.stackSize = aAmount2;
- if (GT_Values.RA.addAssemblerRecipe(r, r1, aOutput, a1, a2)) {
- mCompleted++;
- }
- }
- }
- }
- }
- else if (aInput1 instanceof String) {
- List<ItemStack> x = OreDictionary.getOres((String) aInput1, false);
- if (x != null && x.size() > 0) {
- for (ItemStack r : x) {
- r.stackSize = aAmount1;
- if (GT_Values.RA.addAssemblerRecipe(r, (ItemStack) aInput2, aOutput, a1, a2)) {
- mCompleted++;
- }
- }
- }
-
- }
- else {
- List<ItemStack> x = OreDictionary.getOres((String) aInput2, false);
- if (x != null && x.size() > 0) {
- for (ItemStack r : x) {
- r.stackSize = aAmount1;
- if (GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, r, aOutput, a1, a2)) {
- mCompleted++;
- }
- }
- }
- }
- return mCompleted > 0;
- }
- else {
- return GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, (ItemStack) aInput2, aOutput, a1, a2);
- }
- }
-