From 8a19bd9fc921fd2e71c3f00de4aae9996f9e15c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Sat, 3 Jun 2017 12:45:20 +0200 Subject: [PATCH] Increased the input slots of the assembler from 2 to 6. --- .../interfaces/internal/IGT_RecipeAdder.java | 17 ++++++++++++++--- .../java/gregtech/common/GT_RecipeAdder.java | 14 +++++++++----- .../textures/gui/basicmachines/Assembler.png | Bin 2387 -> 3124 bytes 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java index 8f487874..14cb6d1b 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -226,7 +226,7 @@ public interface IGT_RecipeAdder { public boolean addCNCRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt); /** - * Adds a Assembler Recipe + * Adds an Assembler Recipe * * @param aInput1 must be != null * @param aOutput1 must be != null @@ -236,20 +236,31 @@ public interface IGT_RecipeAdder { public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt); /** - * Adds a Assembler Recipe + * Adds an Assembler Recipe * * @param aInput1 must be != null + * @param aInput2 must be != null * @param aOutput1 must be != null * @param aDuration must be > 0 * @param aEUt should be > 0 */ public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); + /** + * Adds an Assembler Recipe + * + * @param aInputs must be != null + * @param aOutput1 must be != null + * @param aDuration must be > 0 + * @param aEUt should be > 0 + */ + public boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); + public boolean addAssemblerRecipe(ItemStack aInput1, Object aOreDict, int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt); /** - * Adds a Assembler Recipe + * Adds a Circuit Assembler Recipe * * @param aInputs must be 1-6 ItemStacks * @param aFluidInput 0-1 fluids diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 183f35e6..4e5eec6a 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 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; } - 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; } diff --git a/src/main/resources/assets/gregtech/textures/gui/basicmachines/Assembler.png b/src/main/resources/assets/gregtech/textures/gui/basicmachines/Assembler.png index 871a39386e8a4b7ba58c7f8b72c9e2b5b64d7b0f..7ab09c5f2e1877798a579d3f144b587534915544 100644 GIT binary patch literal 3124 zcmcguX;4#H7QP8VL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