diff options
author | Sphyix <masifede2@gmail.com> | 2021-11-21 12:59:39 +0100 |
---|---|---|
committer | Sphyix <masifede2@gmail.com> | 2021-11-21 12:59:39 +0100 |
commit | 2901426a3fbaee614e245bc3d7f68dce9b1fd4a6 (patch) | |
tree | 5b7717983e0f53f94c1c67cb6d2186f452bb7e69 /src/main/java/gregtech/common/GT_RecipeAdder.java | |
parent | 8b9f24202072698748cad0b5f6d0b6c9f9ce2a42 (diff) | |
parent | abeecd2da02c7d38cb1c5b6e2fd5517c6f8a994b (diff) | |
download | GT5-Unofficial-2901426a3fbaee614e245bc3d7f68dce9b1fd4a6.tar.gz GT5-Unofficial-2901426a3fbaee614e245bc3d7f68dce9b1fd4a6.tar.bz2 GT5-Unofficial-2901426a3fbaee614e245bc3d7f68dce9b1fd4a6.zip |
Merge branch 'experimental' of https://github.com/Sphyix/GT5-Unofficial into experimental
Diffstat (limited to 'src/main/java/gregtech/common/GT_RecipeAdder.java')
-rw-r--r-- | src/main/java/gregtech/common/GT_RecipeAdder.java | 71 |
1 files changed, 66 insertions, 5 deletions
diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index cdf3bf38b7..1571ef7b46 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -10,11 +10,8 @@ import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.internal.IGT_RecipeAdder; import gregtech.api.objects.GT_FluidStack; import gregtech.api.objects.ItemData; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; +import gregtech.api.util.*; import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine; -import gregtech.api.util.GT_Utility; import gregtech.common.items.GT_IntegratedCircuit_Item; import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; import mods.railcraft.common.items.RailcraftToolItems; @@ -660,6 +657,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } new GT_Recipe(aInput1, aOutput1, aDuration, aEUt, 0);//Since all other methods are taken + FluidStack tInputFluid = GT_Utility.getFluidForFilledItem(aInput1, true); + FluidStack tOutputFluid = GT_Utility.getFluidForFilledItem(aOutput1, true); + if (tInputFluid != null && tOutputFluid != null) { + addVacuumFreezerRecipe(tInputFluid, tOutputFluid, aDuration, aEUt); + } return true; } @@ -672,6 +674,20 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } new GT_Recipe(aInput1, aOutput1, aDuration); + FluidStack tInputFluid = GT_Utility.getFluidForFilledItem(aInput1, true); + FluidStack tOutputFluid = GT_Utility.getFluidForFilledItem(aOutput1, true); + if (tInputFluid != null && tOutputFluid != null) { + addVacuumFreezerRecipe(tInputFluid, tOutputFluid, aDuration, 120); + } + return true; + } + + @Override + public boolean addVacuumFreezerRecipe(FluidStack aInput1, FluidStack aOutput1, int aDuration, int aEUt) { + if ((aInput1 == null) || (aOutput1 == null)) { + return false; + } + new GT_Recipe(aInput1, aOutput1, aDuration, aEUt); return true; } @@ -706,6 +722,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override + public boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt) { + return false; + } + + @Override public boolean addForgeHammerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) { if ((aInput1 == null) || (aOutput1 == null)) { return false; @@ -974,7 +995,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { 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; } - @Override public boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aBathingFluid == null) || (aOutput1 == null)) { @@ -988,6 +1008,18 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override + public boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { + if ((aInput == null) || (aBathingFluid == null) || (aOutput1 == null)) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("chemicalbath", aInput, aDuration)) <= 0) { + return false; + } + GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput1, aOutput2, aOutput3}, null, aChances, new FluidStack[]{aBathingFluid}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0); + return true; + } + + @Override public boolean addElectromagneticSeparatorRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) { if ((aInput == null) || (aOutput1 == null)) { return false; @@ -1076,6 +1108,20 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[]{aInput, aCircuit}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluid}, null, aDuration, aEUt, aCleanroom ? -100 : 0); return true; } + @Override + public boolean addAutoclave4Recipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, FluidStack aFluidOut, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean aCleanroom) { + if ((aInput == null) || (aFluidIn == null) || (aOutputs == null)) { + return false; + } + if ((aDuration = GregTech_API.sRecipeFile.get("autoclave", aInput, aDuration)) <= 0) { + return false; + } + if (!GT_Mod.gregtechproxy.mEnableCleanroom){ + aCleanroom = false; + } + GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[] {aInput, aCircuit} , aOutputs, null, aChances, new FluidStack[]{aFluidIn}, new FluidStack[]{aFluidOut}, aDuration, aEUt, aCleanroom ? -200 : 0); + return true; + } @Override public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) { @@ -1103,6 +1149,21 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } @Override + public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8, ItemStack aInput9, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt) { + if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { + return false; + } + if ((aOutput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("mixer", aOutput1, aDuration)) <= 0)) { + return false; + } + if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("mixer", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) { + return false; + } + GT_Recipe.GT_Recipe_Map.sMixerRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0); + return true; + } + + @Override public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt) { return addLaserEngraverRecipe( aItemToEngrave, aLens, aEngravedItem, aDuration, aEUt, false); } |