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 871a3938..7ab09c5f 100644 Binary files a/src/main/resources/assets/gregtech/textures/gui/basicmachines/Assembler.png and b/src/main/resources/assets/gregtech/textures/gui/basicmachines/Assembler.png differ