aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/GT_RecipeAdder.java
diff options
context:
space:
mode:
authorDream-Master <dream-master@gmx.net>2017-09-22 20:11:11 +0200
committerDream-Master <dream-master@gmx.net>2017-09-27 22:19:07 +0200
commit9067cd1282d81142c35a28d5c924dfdb0e77ebde (patch)
tree6be4e3738a05158f8da644aec1c27e4a1a82fb70 /src/main/java/gregtech/common/GT_RecipeAdder.java
parentc02d98c1e8877d601c14fff1d8c94d3cd99f2a8d (diff)
downloadGT5-Unofficial-9067cd1282d81142c35a28d5c924dfdb0e77ebde.tar.gz
GT5-Unofficial-9067cd1282d81142c35a28d5c924dfdb0e77ebde.tar.bz2
GT5-Unofficial-9067cd1282d81142c35a28d5c924dfdb0e77ebde.zip
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.
Diffstat (limited to 'src/main/java/gregtech/common/GT_RecipeAdder.java')
-rw-r--r--src/main/java/gregtech/common/GT_RecipeAdder.java14
1 files changed, 12 insertions, 2 deletions
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) {