From 4c4c26043fd8b9175388db053ad6367a1b79d74b Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 4 Sep 2016 11:51:27 +0200 Subject: [PATCH] Update GT_RecipeAdder.java --- .../java/gregtech/common/GT_RecipeAdder.java | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 2030d12c..4ee9e640 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -516,7 +516,10 @@ public class GT_RecipeAdder return true; } + //Non tierable AF public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput) { + int aDuration= aFluidOutput == null ? aFluidInput.amount / 62 : aFluidOutput.amount / 62; + if ((aInput != null) && (aOutput != null)) { if ((aFluidInput == null ? 1 : 0) != (aFluidOutput == null ? 1 : 0)) { } @@ -526,7 +529,28 @@ public class GT_RecipeAdder if (!GregTech_API.sRecipeFile.get("fluidcanner", aOutput, true)) { return false; } - GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new FluidStack[]{aFluidInput == null ? null : aFluidInput}, new FluidStack[]{aFluidOutput == null ? null : aFluidOutput}, aFluidOutput == null ? aFluidInput.amount / 62 : aFluidOutput.amount / 62, 1, 0); + if ((aDuration = GregTech_API.sRecipeFile.get("fluidcanner", aInput, aDuration)) <= 0) { + return false; + } + GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new FluidStack[]{aFluidInput == null ? null : aFluidInput}, new FluidStack[]{aFluidOutput == null ? null : aFluidOutput}, aDuration, 1, 0); + return true; + } + + //Tierable AF + public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt) { + if ((aInput != null) && (aOutput != null)) { + if ((aFluidInput == null ? 1 : 0) != (aFluidOutput == null ? 1 : 0)) { + } + } else { + return false; + } + if (!GregTech_API.sRecipeFile.get("fluidcanner", aOutput, true)) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("fluidcanner", aInput, aDuration)) <= 0) { + return false; + } + GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new FluidStack[]{aFluidInput == null ? null : aFluidInput}, new FluidStack[]{aFluidOutput == null ? null : aFluidOutput}, aDuration, aEUt, 0); return true; }