From 55f64675b42ac8d3c557cc850f78664bee006f6f Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Sat, 28 Jan 2023 19:32:44 -0800 Subject: [ci skip] spotlessApply with the new settings --- .../xmod/gregtech/recipes/GregtechRecipeAdder.java | 1498 +++++++++----------- .../xmod/gregtech/recipes/RecipesToRemove.java | 33 +- .../machines/RECIPEHANDLER_AssemblyLine.java | 11 +- .../recipes/machines/RECIPEHANDLER_CokeOven.java | 131 +- .../recipes/machines/RECIPEHANDLER_Dehydrator.java | 131 +- .../machines/RECIPEHANDLER_MatterFabricator.java | 71 +- 6 files changed, 905 insertions(+), 970 deletions(-) (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/recipes') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java index 4c95ea4f22..e836112814 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java @@ -4,6 +4,16 @@ import static gregtech.GT_Mod.GT_FML_LOGGER; import static gregtech.api.enums.GT_Values.RA; 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 net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.oredict.OreDictionary; + import gregtech.api.GregTech_API; import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.GT_Values; @@ -32,26 +42,12 @@ 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 java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -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) { + 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(); @@ -91,10 +87,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { 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)) { + 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()+" @@ -112,12 +106,12 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( true, - new ItemStack[] {aInput1, aInput2}, - new ItemStack[] {aOutput}, + new ItemStack[] { aInput1, aInput2 }, + new ItemStack[] { aOutput }, null, new int[] {}, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, Math.max(1, aDuration), Math.max(1, aEUt), 0); @@ -129,21 +123,17 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { // 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); - }*/ + /* + * 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); @@ -167,30 +157,24 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } @Override - public boolean addCokeOvenRecipe( - int aCircuit, - ItemStack aInput2, - FluidStack[] aFluidInputs, - FluidStack[] aFluidOutputs, - ItemStack[] aOutputs, - int aDuration, - int aEUt) { + public boolean addCokeOvenRecipe(int aCircuit, ItemStack aInput2, FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt) { return addCokeOvenRecipe( - aInput2, CI.getNumberedCircuit(aCircuit), aFluidInputs, aFluidOutputs, aOutputs, aDuration, aEUt); + aInput2, + CI.getNumberedCircuit(aCircuit), + aFluidInputs, + aFluidOutputs, + aOutputs, + aDuration, + aEUt); } @Override - public boolean addCokeOvenRecipe( - ItemStack aInput1, - ItemStack aInput2, - FluidStack[] aFluidInputs, - FluidStack[] aFluidOutputs, - ItemStack[] aOutputs, - int aDuration, - int aEUt) { + 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}, + new ItemStack[] { aInput1, aInput2 }, aOutputs, null, new int[] {}, @@ -205,8 +189,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } @Override - public boolean addMatterFabricatorRecipe( - final FluidStack aFluidInput, final FluidStack aFluidOutput, final int aDuration, final int aEUt) { + public boolean addMatterFabricatorRecipe(final FluidStack aFluidInput, final FluidStack aFluidOutput, + final int aDuration, final int aEUt) { try { try { // RECIPEHANDLER_MatterFabricator.debug1(); @@ -237,7 +221,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { null, new int[] {}, new FluidStack[] {}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0); @@ -252,8 +236,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { new ItemStack[] {}, null, new int[] {}, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0); @@ -277,29 +261,24 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } @Override - public boolean addMatterFabricatorRecipe( - final ItemStack aInputStack, - final FluidStack aFluidInput, - final FluidStack aFluidOutput, - final int aDuration, - final int aEUt) { + 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) { - } + } catch (final NullPointerException e) {} try { if (aFluidInput == null) { GTPP_Recipe aRecipe = new GTPP_Recipe( false, - new ItemStack[] {aInputStack}, + new ItemStack[] { aInputStack }, new ItemStack[] {}, null, new int[] {}, new FluidStack[] {}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0); @@ -307,12 +286,12 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } else { GTPP_Recipe aRecipe = new GTPP_Recipe( false, - new ItemStack[] {aInputStack}, + new ItemStack[] { aInputStack }, new ItemStack[] {}, null, new int[] {}, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0); @@ -340,83 +319,43 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } /* - * @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, + * @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 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 { + @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) { @@ -431,8 +370,11 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } } if (aFluidInput != null) { - Logger.WARNING("Recipe requires input: " - + aFluidInput.getFluid().getName() + " " + aFluidInput.amount + "mbs"); + 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))) { @@ -451,8 +393,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { aOutputItems, null, aChances, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, Math.max(1, aDuration), Math.max(1, aEUt), 0); @@ -462,19 +404,14 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { 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); - }*/ + /* + * 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) { @@ -484,128 +421,124 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } @Override - public boolean addBlastSmelterRecipe( - final ItemStack[] aInput, FluidStack aOutput, final int aChance, int aDuration, final int aEUt) { + public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aOutput, final int aChance, int aDuration, + final int aEUt) { return addBlastSmelterRecipe( - aInput, (FluidStack) null, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, 3700); + aInput, + (FluidStack) 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) { + 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); + aInput, + aInputFluid, + 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) { + 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); + 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) { + 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( - final ItemStack[] aInput, - FluidStack[] aInputFluid, - FluidStack aOutput, - ItemStack[] aOutputStack, - final int aChance[], - int aDuration, - final int aEUt) { + 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) { + 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); + aInput, + aInputFluid, + aOutput, + new ItemStack[] {}, + new int[] { aChance }, + aDuration, + aEUt, + aSpecialValue); } @Override - public boolean addBlastSmelterRecipe( - ItemStack[] aInput, - FluidStack[] aInputFluid, - FluidStack aOutput, - int aChance, - int aDuration, - int aEUt, - int aSpecialValue) { + 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); + 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) { + public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, + ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue) { return addBlastSmelterRecipe( - aInput, aInputFluid, aOutput, aOutputStack, aChance, aDuration, aEUt, aSpecialValue, true); + aInput, + aInputFluid, + aOutput, + aOutputStack, + aChance, + aDuration, + aEUt, + aSpecialValue, + true); } @Override - public boolean addBlastSmelterRecipe( - ItemStack[] aInput, - FluidStack[] aInputFluid, - FluidStack aOutput, - ItemStack[] aOutputStack, - int[] aChance, - int aDuration, - int aEUt, - int aSpecialValue) { + public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack[] aInputFluid, FluidStack aOutput, + ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue) { return addBlastSmelterRecipe( - aInput, aInputFluid, aOutput, aOutputStack, aChance, aDuration, aEUt, aSpecialValue, true); + aInput, + aInputFluid, + aOutput, + aOutputStack, + aChance, + aDuration, + aEUt, + aSpecialValue, + true); } @Override - public boolean addBlastSmelterRecipe( - ItemStack[] aInput, - FluidStack aInputFluid, - FluidStack aOutput, - ItemStack[] aOutputStack, - int[] aChance, - int aDuration, - int aEUt, - int aSpecialValue, + public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, + ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue, boolean aOptimizeRecipe) { return addBlastSmelterRecipe( aInput, - new FluidStack[] {aInputFluid}, + new FluidStack[] { aInputFluid }, aOutput, aOutputStack, aChance, @@ -615,15 +548,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { aOptimizeRecipe); } - public boolean addBlastSmelterRecipe( - ItemStack[] aInput, - FluidStack[] aInputFluid, - FluidStack aOutput, - ItemStack[] aOutputStack, - int[] aChance, - int aDuration, - int aEUt, - int aSpecialValue, + public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack[] aInputFluid, FluidStack aOutput, + ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue, boolean aOptimizeRecipe) { if ((aInput == null) || (aOutput == null)) { Logger.WARNING("Fail - Input or Output was null."); @@ -636,17 +562,19 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { 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) { + 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); + Logger.WARNING( + "tMaterial[" + das + + "]: " + + aInput[das].getDisplayName() + + ", Amount: " + + aInput[das].stackSize); } } @@ -664,7 +592,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { null, aChance, aInputFluid, - new FluidStack[] {aOutput}, + new FluidStack[] { aOutput }, Math.max(1, aDuration), Math.max(1, aEUt), aSpecialValue); @@ -674,15 +602,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } @Override - public boolean addQuantumTransformerRecipe( - ItemStack[] aInput, - FluidStack[] aFluidInput, - FluidStack[] aFluidOutput, - ItemStack[] aOutputStack, - int[] aChances, - int aDuration, - int aEUt, - int aSpecialValue) { + public boolean addQuantumTransformerRecipe(ItemStack[] aInput, FluidStack[] aFluidInput, FluidStack[] aFluidOutput, + ItemStack[] aOutputStack, int[] aChances, int aDuration, int aEUt, int aSpecialValue) { if (aInput == null) { aInput = new ItemStack[0]; } @@ -692,7 +613,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } // if (aInput.length + aFluidInput.length < 1) { - // return false; + // return false; // } if (aOutputStack == null) { @@ -704,107 +625,91 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } // if (aOutputStack.length + aFluidOutput.length < 4) { - // return false; + // return false; // } // if (aChances == null || aChances.length != aOutputStack.length + aFluidOutput.length) { - // return false; + // return false; // } - GTPP_Recipe.GTPP_Recipe_Map.sQuantumForceTransformerRecipes.add(new GT_Recipe( - false, - aInput, - aOutputStack, - null, - aChances, - aFluidInput, - aFluidOutput, - aDuration, - aEUt, - aSpecialValue)); + GTPP_Recipe.GTPP_Recipe_Map.sQuantumForceTransformerRecipes.add( + new GT_Recipe( + false, + aInput, + aOutputStack, + null, + aChances, + aFluidInput, + aFluidOutput, + aDuration, + aEUt, + aSpecialValue)); return true; } @Override - public boolean addLFTRRecipe( - final ItemStack aInput1, - final FluidStack aInput2, - final ItemStack aOutput1, - final FluidStack aOutput2, - final int aDuration, - final int aEUt) { + 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) { + 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) { + 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); + 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) { + 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) { + 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}; + final FluidStack inputs[] = { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 }; + final FluidStack outputs[] = { aOutput1, aOutput2 }; int aSize = GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.mRecipeList.size(); int aSize2 = aSize; @@ -829,17 +734,10 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } @Override - public boolean addCyclotronRecipe( - ItemStack aInputs, - FluidStack aFluidInput, - ItemStack[] aOutputs, - FluidStack aFluidOutput, - int[] aChances, - int aDuration, - int aEUt, - int aSpecialValue) { + public boolean addCyclotronRecipe(ItemStack aInputs, FluidStack aFluidInput, ItemStack[] aOutputs, + FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) { return addCyclotronRecipe( - new ItemStack[] {aInputs}, + new ItemStack[] { aInputs }, aFluidInput, aOutputs, aFluidOutput, @@ -850,15 +748,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } @Override - public boolean addCyclotronRecipe( - ItemStack[] aInputs, - FluidStack aFluidInput, - ItemStack[] aOutput, - FluidStack aFluidOutput, - int[] aChances, - int aDuration, - int aEUt, - int aSpecialValue) { + 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; @@ -870,8 +761,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { aOutput, null, aChances, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, Math.max(1, aDuration), Math.max(1, aEUt), aSpecialValue); @@ -891,30 +782,20 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } @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) { + 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; } GTPP_Recipe aSpecialRecipe = new GTPP_Recipe( true, - new ItemStack[] {aInput1, aInput2, aInput3, aInput4}, - new ItemStack[] {aOutput1, aOutput2, aOutput3, aOutput4}, + new ItemStack[] { aInput1, aInput2, aInput3, aInput4 }, + new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, null, new int[] {}, - new FluidStack[] {aFluidInput}, - new FluidStack[] {aFluidOutput}, + new FluidStack[] { aFluidInput }, + new FluidStack[] { aFluidOutput }, Math.max(1, aDuration), Math.max(1, aEUt), 0); @@ -926,9 +807,9 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { // Machine Component Assembler @Override - public boolean addComponentMakerRecipe( - ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) { - if (areItemsAndFluidsBothNull(aInputs, new FluidStack[] {aFluidInput})) { + public boolean addComponentMakerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, + int aDuration, int aEUt) { + if (areItemsAndFluidsBothNull(aInputs, new FluidStack[] { aFluidInput })) { return false; } if (aOutput1 == null) { @@ -943,10 +824,10 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { GTPP_Recipe aRecipe = new GTPP_Recipe( false, aInputs, - new ItemStack[] {aOutput1}, + new ItemStack[] { aOutput1 }, null, new int[] {}, - new FluidStack[] {aFluidInput}, + new FluidStack[] { aFluidInput }, new FluidStack[] {}, aDuration, aEUt, @@ -955,17 +836,10 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { return true; } - public boolean addMultiblockCentrifugeRecipe( - ItemStack[] aInputs, - FluidStack[] aFluidInputs, - FluidStack[] aFluidOutputs, - ItemStack[] aOutputs, - int[] aChances, - int aDuration, - int aEUtick, + 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) + if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { return false; } @@ -980,7 +854,16 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } GTPP_Recipe aRecipe = new GTPP_Recipe( - false, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial); + 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, @@ -988,17 +871,10 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { return true; } - public boolean addMultiblockElectrolyzerRecipe( - ItemStack[] aInputs, - FluidStack[] aFluidInputs, - FluidStack[] aFluidOutputs, - ItemStack[] aOutputs, - int[] aChances, - int aDuration, - int aEUtick, + 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) + if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { return false; } @@ -1012,24 +888,25 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } GTPP_Recipe aRecipe = new GTPP_Recipe( - false, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial); + 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) + 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; } @@ -1044,25 +921,27 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } GTPP_Recipe aRecipe = new GTPP_Recipe( - false, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial); + 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; - }*/ + /* + * 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) + 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; } @@ -1076,22 +955,24 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } GTPP_Recipe aRecipe = new GTPP_Recipe( - false, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial); + false, + aInputs, + aOutputs, + null, + aChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUtick, + aSpecial); GTPP_Recipe.GTPP_Recipe_Map.sMultiblockMixerRecipes_GT.addRecipe(aRecipe); return true; } - public boolean addMultiblockChemicalDehydratorRecipe( - ItemStack[] aInputs, - FluidStack[] aFluidInputs, - FluidStack[] aFluidOutputs, - ItemStack[] aOutputs, - int[] aChances, - int aDuration, - int aEUtick, + public boolean addMultiblockChemicalDehydratorRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, + FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial) { - if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) - || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) + if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) { return false; } @@ -1105,13 +986,22 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } GTPP_Recipe aRecipe = new GTPP_Recipe( - false, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial); + false, + aInputs, + aOutputs, + null, + aChances, + aFluidInputs, + aFluidOutputs, + aDuration, + aEUtick, + aSpecial); GTPP_Recipe.GTPP_Recipe_Map.sMultiblockChemicalDehydratorRecipes.addRecipe(aRecipe); return true; } - public boolean addAssemblerRecipeWithOreDict( - Object aInput1, int aAmount1, Object aInput2, int aAmount2, ItemStack aOutput, int a1, int a2) { + 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) { @@ -1156,15 +1046,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } } - public boolean addAssemblerRecipeWithOreDict( - Object aInput1, - int aAmount1, - Object aInput2, - int aAmount2, - FluidStack aInputFluid, - ItemStack aOutput, - int a1, - int a2) { + public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, + FluidStack aInputFluid, ItemStack aOutput, int a1, int a2) { if (aInput1 instanceof String || aInput2 instanceof String) { int mCompleted = 0; if (aInput1 instanceof String && aInput2 instanceof String) { @@ -1205,8 +1088,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } return mCompleted > 0; } else { - return GT_Values.RA.addAssemblerRecipe( - (ItemStack) aInput1, (ItemStack) aInput2, aInputFluid, aOutput, a1, a2); + return GT_Values.RA + .addAssemblerRecipe((ItemStack) aInput1, (ItemStack) aInput2, aInputFluid, aOutput, a1, a2); } } @@ -1281,8 +1164,13 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { Method[] aDump = TTRecipeAdder.getDeclaredMethods(); for (Method m : aDump) { if (m != null) { - Logger.INFO("Found " + m.getName() + " | " + m.getModifiers() + " | " - + ArrayUtils.toString(m.getParameters(), "EMPTY") + ""); + Logger.INFO( + "Found " + m.getName() + + " | " + + m.getModifiers() + + " | " + + ArrayUtils.toString(m.getParameters(), "EMPTY") + + ""); if (m.getName().toLowerCase().equals("addresearchableassemblylinerecipe")) { Logger.INFO("Types: " + ArrayUtils.toString(m.getParameterTypes())); } @@ -1346,13 +1234,13 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } } - public boolean addSixSlotAssemblingRecipe( - ItemStack[] aInputs, FluidStack aInputFluid, ItemStack aOutput1, int aDuration, int aEUt) { + public boolean addSixSlotAssemblingRecipe(ItemStack[] aInputs, FluidStack aInputFluid, ItemStack aOutput1, + int aDuration, int aEUt) { if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { if (mSixSlotAssembly != null) { try { - return (boolean) - mSixSlotAssembly.invoke(GT_Values.RA, aInputs, aInputFluid, aOutput1, aDuration, aEUt); + return (boolean) mSixSlotAssembly + .invoke(GT_Values.RA, aInputs, aInputFluid, aOutput1, aDuration, aEUt); } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { if (CORE.GTNH) { return false; @@ -1364,19 +1252,11 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } @Override - public boolean addAssemblylineRecipe( - ItemStack aResearchItem, - int aResearchTime, - ItemStack[] aInputs, - FluidStack[] aFluidInputs, - ItemStack aOutput, - int aDuration, - int aEUt) { - if (GTNH) - return RA.addAssemblylineRecipe( - aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt); - if ((aResearchItem == null) - || (aResearchTime <= 0) + public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, + FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { + if (GTNH) return RA + .addAssemblylineRecipe(aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt); + if ((aResearchItem == null) || (aResearchTime <= 0) || (aInputs == null) || (aOutput == null) || aInputs.length > 15 @@ -1388,15 +1268,18 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } for (ItemStack tItem : aInputs) { if (tItem == null) { - GT_FML_LOGGER.info("addAssemblingLineRecipe " + aResearchItem.getDisplayName() + " --> " - + aOutput.getUnlocalizedName() + " there is some null item in that recipe"); + GT_FML_LOGGER.info( + "addAssemblingLineRecipe " + aResearchItem.getDisplayName() + + " --> " + + aOutput.getUnlocalizedName() + + " there is some null item in that recipe"); } } GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( false, - new ItemStack[] {aResearchItem}, - new ItemStack[] {aOutput}, - new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, + new ItemStack[] { aResearchItem }, + new ItemStack[] { aOutput }, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0]) }, null, null, aResearchTime, @@ -1405,33 +1288,32 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe( false, aInputs, - new ItemStack[] {aOutput}, - new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])}, + new ItemStack[] { aOutput }, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0]) }, aFluidInputs, null, aDuration, aEUt, 0, false); - GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe_AssemblyLine( - aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt)); + GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add( + new GT_Recipe_AssemblyLine( + aResearchItem, + aResearchTime, + aInputs, + aFluidInputs, + aOutput, + aDuration, + aEUt)); return true; } @Override - public boolean addAssemblylineRecipe( - ItemStack aResearchItem, - int aResearchTime, - Object[] aInputs, - FluidStack[] aFluidInputs, - ItemStack aOutput, - int aDuration, - int aEUt) { - if (GTNH) - return RA.addAssemblylineRecipe( - aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt); - if ((aResearchItem == null) - || (aResearchTime <= 0) + public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, Object[] aInputs, + FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) { + if (GTNH) return RA + .addAssemblylineRecipe(aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt); + if ((aResearchItem == null) || (aResearchTime <= 0) || (aInputs == null) || (aOutput == null) || aInputs.length > 15 @@ -1472,18 +1354,20 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { } tAlts[i] = uList.toArray(new ItemStack[uList.size()]); continue; - } catch (Exception t) { - } + } catch (Exception t) {} } } - GT_FML_LOGGER.info("addAssemblingLineRecipe " + aResearchItem.getDisplayName() + " --> " - + aOutput.getUnlocalizedName() + " there is some null item in that recipe"); + GT_FML_LOGGER.info( + "addAssemblingLineRecipe " + aResearchItem.getDisplayName() + + " --> " + + aOutput.getUnlocalizedName() + + " there is some null item in that recipe"); } GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe( false, - new ItemStack[] {aResearchItem}, - new ItemStack[] {aOutput}, - new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, + new ItemStack[] { aResearchItem }, + new ItemStack[] { aOutput }, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0]) }, null, null, aResearchTime, @@ -1492,8 +1376,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe( false, tInputs, - new ItemStack[] {aOutput}, - new ItemStack[] {ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])}, + new ItemStack[] { aOutput }, + new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0]) }, aFluidInputs,