aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-09-04 22:34:46 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-09-04 22:34:46 +1000
commitd8dc6e3e04024ea63db16b6859c9f1f08101a924 (patch)
tree0813dafc578bf4b167eb1b447d2f6625e68d0332 /src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java
parent9760d0067df95c30189c3b67c0ec1d13a021a14e (diff)
downloadGT5-Unofficial-d8dc6e3e04024ea63db16b6859c9f1f08101a924.tar.gz
GT5-Unofficial-d8dc6e3e04024ea63db16b6859c9f1f08101a924.tar.bz2
GT5-Unofficial-d8dc6e3e04024ea63db16b6859c9f1f08101a924.zip
+ Added some base Meta Tile Entities to handle my custom recipe system.
+ Added some Test recipes for the Dehydrator. + Added 3 different recipe handlers for the Dehydrator. % Added a new Method in FluidUtils that accepts a fluidstack and amount to return a fluidstack[].
Diffstat (limited to 'src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java')
-rw-r--r--src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java43
1 files changed, 42 insertions, 1 deletions
diff --git a/src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java
index 5460689ec8..13e41ba62b 100644
--- a/src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -67,7 +67,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
}
@Override
- public boolean addMattrFabricatorRecipe(FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt) {
+ public boolean addMatterFabricatorRecipe(FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt) {
try {
try {
RECIPEHANDLER_MatterFabricator.debug1();
@@ -132,5 +132,46 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
return true;
}
+ @Override
+ public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, FluidStack aFluid, ItemStack[] aOutputItems, FluidStack aOutputFluid, int aDuration, int aEUt) {
+ if ((aItemA == null) || (aItemB == null) || (aOutputItems == null)) {
+ return false;
+ }
+ for (ItemStack tStack : aOutputItems) {
+ if (tStack != null) {
+ if ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aItemA, aDuration)) <= 0) {
+ return false;
+ }
+ GregtechRecipe.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, new ItemStack[]{aItemA, aItemB}, aOutputItems.clone(), null, null, null, aDuration, aEUt, 0);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, ItemStack[] aOutputItems, int aDuration, int aEUt) {
+ if ((aItemA == null) || (aItemB == null) || (aOutputItems == null)) {
+ return false;
+ }
+ if ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aItemA, aDuration)) <= 0) {
+ return false;
+ }
+ GregtechRecipe.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, new ItemStack[]{aItemA, aItemB}, aOutputItems.clone(), null, null, null, aDuration, aEUt, 0);
+ return true;
+ }
+
+ @Override
+ public boolean addDehydratorRecipe(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutput, int aDuration, int aEUt) {
+ if ((aInput == null) || (aFluid == null) || (aOutput == null)) {
+ return false;
+ }
+ if ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aInput, aDuration)) <= 0) {
+ return false;
+ }
+ GregtechRecipe.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutput.clone(), null, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0);
+ return true;
+ }
+
}