diff options
author | Johannes Gäßler <updrn@student.kit.edu> | 2017-06-03 12:45:20 +0200 |
---|---|---|
committer | Johannes Gäßler <updrn@student.kit.edu> | 2017-06-03 12:45:20 +0200 |
commit | 8a19bd9fc921fd2e71c3f00de4aae9996f9e15c9 (patch) | |
tree | a962930b40488764bf975bb8cf8f80937b58b32d /src/main/java/gregtech/common/GT_RecipeAdder.java | |
parent | 0bbde9ff01a426c8d72cb809503d9850b1e0bf8a (diff) | |
download | GT5-Unofficial-8a19bd9fc921fd2e71c3f00de4aae9996f9e15c9.tar.gz GT5-Unofficial-8a19bd9fc921fd2e71c3f00de4aae9996f9e15c9.tar.bz2 GT5-Unofficial-8a19bd9fc921fd2e71c3f00de4aae9996f9e15c9.zip |
Increased the input slots of the assembler from 2 to 6.
Diffstat (limited to 'src/main/java/gregtech/common/GT_RecipeAdder.java')
-rw-r--r-- | src/main/java/gregtech/common/GT_RecipeAdder.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 183f35e623..4e5eec6ab3 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -255,13 +255,17 @@ public class GT_RecipeAdder } public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) { - if ((aInput1 == null) || (aOutput1 == null)) { - return false; - } - if ((aDuration = GregTech_API.sRecipeFile.get("assembling", aOutput1, aDuration)) <= 0) { + return addAssemblerRecipe(new ItemStack[]{aInput1, aInput2}, aFluidInput, aOutput1, aDuration, aEUt); + } + + public boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) { + if (areItemsAndFluidsBothNull(aInputs, null)) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("assembling", aOutput1, aDuration)) <= 0) { return false; } - GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe(true, new ItemStack[]{aInput1, (aInput2 == null ? aInput1 : aInput2)}, new ItemStack[]{aOutput1}, null, new FluidStack[]{aFluidInput == null ? null : aFluidInput}, null, aDuration, aEUt, 0); + GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[]{aOutput1}, null, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, 0); return true; } |