From 9067cd1282d81142c35a28d5c924dfdb0e77ebde Mon Sep 17 00:00:00 2001 From: Dream-Master Date: Fri, 22 Sep 2017 20:11:11 +0200 Subject: cherry pick Commit: 00831784660573b54248a8213cae1d64619a2b98 [0083178] rename Biomass again to Forestry Biomass. Change a brewing recipe a bit to can using Fluids that not registered at GT (FluidStack) Add new recipes for Forestry Biomass and remove old ones. --- src/main/java/gregtech/common/GT_RecipeAdder.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/common') diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 7896a2d138..3c2f9e9615 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -656,8 +656,18 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return addBrewingRecipe(aIngredient, aInput, aOutput, 128, 4, aHidden); } - public boolean addBrewingRecipeCustom(ItemStack aIngredient, Fluid aInput, Fluid aOutput, int aDuration, int aEUt, boolean aHidden) { - return addBrewingRecipe(aIngredient, aInput, aOutput, aDuration, aEUt, aHidden); + public boolean addBrewingRecipeCustom(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { + if ((aInput == null) || (aOutput == null)) { + return false; + } + if (!GregTech_API.sRecipeFile.get("brewing", aOutput.getUnlocalizedName(), true)) { + return false; + } + GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe(false, new ItemStack[]{aIngredient}, null, null, new FluidStack[]{new FluidStack(aInput, 750)}, new FluidStack[]{new FluidStack(aOutput, 750)}, aDuration, aEUt, 0); + if ((aHidden) && (tRecipe != null)) { + tRecipe.mHidden = true; + } + return true; } public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) { -- cgit