diff options
author | Dream-Master <dream-master@gmx.net> | 2017-09-22 20:11:11 +0200 |
---|---|---|
committer | Dream-Master <dream-master@gmx.net> | 2017-09-27 22:19:07 +0200 |
commit | 9067cd1282d81142c35a28d5c924dfdb0e77ebde (patch) | |
tree | 6be4e3738a05158f8da644aec1c27e4a1a82fb70 /src | |
parent | c02d98c1e8877d601c14fff1d8c94d3cd99f2a8d (diff) | |
download | GT5-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')
4 files changed, 28 insertions, 6 deletions
diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index 005a703b6c..c0e8f989a9 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -370,7 +370,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { */ public static Materials Antimatter = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 0, 0 , 255, 255, 255, 0, "Antimatter" , "Antimatter" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyePink , Arrays.asList(new TC_AspectStack(TC_Aspects.POTENTIA, 9), new TC_AspectStack(TC_Aspects.PERFODIO, 8))); public static Materials BioFuel = new Materials( 705, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 255, 128, 0, 0, "BioFuel" , "Biofuel" , 0, 6, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange ); - public static Materials Biomass = new Materials( 704, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 0, 255, 0, 0, "Biomass" , "Biomass" , 3, 8, -1, 0, false, false, 1, 1, 1, Dyes.dyeGreen ); + public static Materials Biomass = new Materials( 704, TextureSet.SET_FLUID , 1.0F, 0, 0, 16 , 0, 255, 0, 0, "Biomass" , "Forestry Biomass" , 3, 8, -1, 0, false, false, 1, 1, 1, Dyes.dyeGreen ); public static Materials CharcoalByproducts = new MaterialBuilder(675, TextureSet.SET_FLUID , "Charcoal Byproducts").addCell().setRGB(120, 68, 33).setColor(Dyes.dyeBrown).constructMaterial(); public static Materials Cheese = new Materials( 894, TextureSet.SET_FINE , 1.0F, 0, 0, 1 |8 , 255, 255, 0, 0, "Cheese" , "Cheese" , 0, 0, 320, 0, false, false, 1, 1, 1, Dyes.dyeYellow ); public static Materials Chili = new Materials( 895, TextureSet.SET_FINE , 1.0F, 0, 0, 1 , 200, 0, 0, 0, "Chili" , "Chili" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed ); 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 c79b42afb2..e4f141ea51 100644 --- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java +++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java @@ -512,7 +512,7 @@ public interface IGT_RecipeAdder { public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, int aDuration, int aEUt, boolean aHidden); - public boolean addBrewingRecipeCustom(ItemStack aIngredient, Fluid aInput, Fluid aOutput, int aDuration, int aEUt, boolean aHidden); + public boolean addBrewingRecipeCustom(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden); /** * Adds a Recipe for the Fermenter 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) { diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 5a362379ab..a24da836ca 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -864,7 +864,6 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addBrewingRecipe(ItemList.IC2_Hops.get(1L, new Object[0]), tFluid, FluidRegistry.getFluid("potion.hopsjuice"), false); GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L), tFluid, FluidRegistry.getFluid("potion.darkcoffee"), false); GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Chili, 1L), tFluid, FluidRegistry.getFluid("potion.chillysauce"), false); - GT_Values.RA.addBrewingRecipe(GT_ModHandler.getIC2Item("biochaff", 1), tFluid, Materials.Biomass.mFluid, false); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(2L, new Object[0]), 200); GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcite, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Phosphorus, 1L), new FluidStack(tFluid, 1000), GT_Values.NF, ItemList.IC2_Fertilizer.get(3L, new Object[0]), 300); @@ -910,7 +909,20 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addBrewingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sugar, 1L), FluidRegistry.getFluid("potion.mundane"), FluidRegistry.getFluid("potion.purpledrink"), true); GT_Values.RA.addBrewingRecipe(new ItemStack(Items.fermented_spider_eye, 1, 0), FluidRegistry.getFluid("potion.mundane"), FluidRegistry.getFluid("potion.weakness"), false); GT_Values.RA.addBrewingRecipe(new ItemStack(Items.fermented_spider_eye, 1, 0), FluidRegistry.getFluid("potion.thick"), FluidRegistry.getFluid("potion.weakness"), false); - + + GT_Values.RA.addBrewingRecipe(GT_ModHandler.getModItem(aTextForestry, "mulch", 16L, 0), FluidRegistry.WATER, FluidRegistry.getFluid("biomass"), false); + GT_Values.RA.addBrewingRecipe(GT_ModHandler.getModItem(aTextForestry, "fertilizerBio", 16L, 0), FluidRegistry.WATER, FluidRegistry.getFluid("biomass"), false); + GT_Values.RA.addBrewingRecipe(GT_ModHandler.getModItem(aTextForestry, "fertilizerCompound", 16L, 0), FluidRegistry.WATER, FluidRegistry.getFluid("biomass"), false); + GT_Values.RA.addBrewingRecipe(GT_ModHandler.getModItem(aTextForestry, "mulch", 12L, 0), GT_ModHandler.getDistilledWater(750L).getFluid(), FluidRegistry.getFluid("biomass"), false); + GT_Values.RA.addBrewingRecipe(GT_ModHandler.getModItem(aTextForestry, "fertilizerBio", 12L, 0), GT_ModHandler.getDistilledWater(750L).getFluid(), FluidRegistry.getFluid("biomass"), false); + GT_Values.RA.addBrewingRecipe(GT_ModHandler.getModItem(aTextForestry, "fertilizerCompound", 12L, 0), GT_ModHandler.getDistilledWater(750L).getFluid(), FluidRegistry.getFluid("biomass"), false); + GT_Values.RA.addBrewingRecipeCustom(GT_ModHandler.getModItem(aTextForestry, "mulch", 10L, 0), FluidRegistry.getFluidStack("fluid.juice", 750), FluidRegistry.getFluidStack("fluid.juice", 750), 128, 4, false); + GT_Values.RA.addBrewingRecipeCustom(GT_ModHandler.getModItem(aTextForestry, "fertilizerBio", 10L, 0), FluidRegistry.getFluidStack("fluid.juice", 750), FluidRegistry.getFluidStack("fluid.juice", 750), 128, 4, false); + GT_Values.RA.addBrewingRecipeCustom(GT_ModHandler.getModItem(aTextForestry, "fertilizerCompound", 10L, 0),FluidRegistry.getFluidStack("fluid.juice", 750), FluidRegistry.getFluidStack("fluid.juice", 750), 128, 4, false); + + GT_Values.RA.addBrewingRecipe(GT_ModHandler.getIC2Item("biochaff", 1), FluidRegistry.WATER, FluidRegistry.getFluid("ic2biomass"), false); + GT_Values.RA.addBrewingRecipe(GT_ModHandler.getIC2Item("biochaff", 1), GT_ModHandler.getDistilledWater(750L).getFluid(), FluidRegistry.getFluid("ic2biomass"), false); + addPotionRecipes("waterbreathing", new ItemStack(Items.fish, 1, 3)); addPotionRecipes("fireresistance", new ItemStack(Items.magma_cream, 1, 0)); addPotionRecipes("nightvision", new ItemStack(Items.golden_carrot, 1, 0)); |