diff options
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech')
3 files changed, 184 insertions, 3 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java index de736dca7b..a788b15a95 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java @@ -138,6 +138,20 @@ public interface IGregtech_RecipeAdder { ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, int aDuration, int aEUt); /** + * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs, More than 1 Fluids) + * + * @param aInput = ItemStack[] (not null, and respects StackSize) + * @param aFluidInput = FluidStack[] (can be null, and respects StackSize) + * @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize) + * @param aChances = Output Chance (can be == 0) + * @param aDuration = Duration (must be >= 0) + * @param aEUt = EU per tick needed for heating up (must be >= 0) + * @return true if the Recipe got added, otherwise false. + */ + public boolean addBlastSmelterRecipe( + ItemStack[] aInput, FluidStack[] aInputFluid, FluidStack aOutput, int aChance, int aDuration, int aEUt); + + /** * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs) * * @param aInput = ItemStack[] (not null, and respects StackSize) @@ -179,6 +193,47 @@ public interface IGregtech_RecipeAdder { boolean aOptimizeRecipe); /** + * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs, More than 1 fluids) + * + * @param aInput = ItemStack[] (not null, and respects StackSize) + * @param aFluidInput = FluidStack[] (can be null, and respects StackSize) + * @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize) + * @param aOutputStack = Item Output (Can be null) + * @param aChances = Output Chance (can be == 0) + * @param aDuration = Duration (must be >= 0) + * @param aEUt = EU per tick needed for heating up (must be >= 0) + * @return true if the Recipe got added, otherwise false. + */ + public boolean addBlastSmelterRecipe( + ItemStack[] aInput, + FluidStack[] aInputFluid, + FluidStack aOutput, + ItemStack[] aOutputStack, + int[] aChance, + int aDuration, + int aEUt); + + 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, + ItemStack[] aOutputStack, + int[] aChance, + int aDuration, + int aEUt, + int aSpecialValue, + boolean aOptimizeRecipe); + + /** * Adds a Recipe for the LFTRr. (up to 9 Inputs) * * @param aInput = ItemStack[] (not null, and respects StackSize) @@ -201,6 +256,29 @@ public interface IGregtech_RecipeAdder { int aEUt, int aSpecialValue); + /** + * Adds a Recipe for the LFTRr. (up to 9 Inputs, More than 1 fluids) + * + * @param aInput = ItemStack[] (not null, and respects StackSize) + * @param aFluidInput = FluidStack[] (can be null, and respects StackSize) + * @param aFluidOutput = Output of the Molten Salts (not null, and respects StackSize) + * @param aOutputStack = Item Output (Can be null) + * @param aChances = Output Chance (can be == 0) + * @param aDuration = Duration (must be >= 0) + * @param aEUt = EU per tick needed for heating up (must be >= 0) + * @param aSpecialValue = Power produced in EU/t per dynamo + * @return true if the Recipe got added, otherwise false. + */ + public boolean addBlastSmelterRecipe( + ItemStack[] aInput, + FluidStack[] aInputFluid, + FluidStack aOutput, + ItemStack[] aOutputStack, + int[] aChance, + int aDuration, + int aEUt, + int aSpecialValue); + public boolean addLFTRRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt); public boolean addLFTRRecipe( diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java index b600289c95..f6d9de7345 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java @@ -152,7 +152,7 @@ public class GregtechMetaTileEntity_IndustrialDehydrator public GT_Recipe.GT_Recipe_Map getRecipeMap() { return mDehydratorMode - ? GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes + ? GTPP_Recipe.GTPP_Recipe_Map.sMultiblockChemicalDehydratorRecipes : GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java index 260e5a37fd..0a0234a752 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java @@ -487,7 +487,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { 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); + aInput, (FluidStack) null, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, 3700); } @Override @@ -505,6 +505,18 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { @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, @@ -516,6 +528,18 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { @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, @@ -530,6 +554,19 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { @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, @@ -541,6 +578,21 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { 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) { + return addBlastSmelterRecipe( + aInput, aInputFluid, aOutput, aOutputStack, aChance, aDuration, aEUt, aSpecialValue, true); + } + + @Override public boolean addBlastSmelterRecipe( ItemStack[] aInput, FluidStack aInputFluid, @@ -551,6 +603,28 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { int aEUt, int aSpecialValue, boolean aOptimizeRecipe) { + return addBlastSmelterRecipe( + aInput, + new FluidStack[] {aInputFluid}, + aOutput, + aOutputStack, + aChance, + aDuration, + aEUt, + aSpecialValue, + aOptimizeRecipe); + } + + 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."); return false; @@ -589,7 +663,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { aOutputStack, null, aChance, - new FluidStack[] {aInputFluid}, + aInputFluid, new FluidStack[] {aOutput}, Math.max(1, aDuration), Math.max(1, aEUt), @@ -954,6 +1028,35 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { return true; } + 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) + || aEUtick <= 0) { + return false; + } + if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) { + Logger.INFO("[Recipe] Error generating Large Chemical Dehydrator 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.sMultiblockChemicalDehydratorRecipes.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) { |
