aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/xmod/gregtech/recipes
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/miscutil/xmod/gregtech/recipes')
-rw-r--r--src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java22
-rw-r--r--src/Java/miscutil/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java81
2 files changed, 92 insertions, 11 deletions
diff --git a/src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java
index ae25ede64b..7f7acac784 100644
--- a/src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/miscutil/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -1,9 +1,9 @@
package miscutil.xmod.gregtech.recipes;
import gregtech.api.GregTech_API;
+import gregtech.api.util.Recipe_GT;
import miscutil.core.util.Utils;
import miscutil.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder;
-import miscutil.xmod.gregtech.api.util.GregtechRecipe;
import miscutil.xmod.gregtech.recipes.machines.RECIPEHANDLER_CokeOven;
import miscutil.xmod.gregtech.recipes.machines.RECIPEHANDLER_Dehydrator;
import miscutil.xmod.gregtech.recipes.machines.RECIPEHANDLER_MatterFabricator;
@@ -47,10 +47,10 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
try {
RECIPEHANDLER_CokeOven.debug4(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt);
if (aFluidInput == null){
- GregtechRecipe.Gregtech_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput}, null, null, null, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
+ Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput}, null, null, null, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
}
else {
- GregtechRecipe.Gregtech_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
+ Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
}
RECIPEHANDLER_CokeOven.debug5(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt);
@@ -101,12 +101,12 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
try {
RECIPEHANDLER_MatterFabricator.debug4(aFluidInput, aFluidOutput, aDuration, aEUt);
if (aFluidInput == null){
- //GregtechRecipe.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true, null, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
- GregtechRecipe.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, null, null, null, null, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
+ //Recipe_GT.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true, null, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
+ Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, null, null, null, null, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
}
else {
- //GregtechRecipe.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
- GregtechRecipe.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, null, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
+ //Recipe_GT.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
+ Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, null, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
}
RECIPEHANDLER_MatterFabricator.debug5(aFluidInput, aFluidOutput, aDuration, aEUt);
@@ -129,7 +129,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
Utils.LOG_INFO("Fuel Input is Invalid.");
return false;
}
- new GregtechRecipe(aInput1, aOutput1, GregTech_API.sRecipeFile.get("fuel_" + aType, aInput1, aEU), aType);
+ //new GregtechRecipe(aInput1, aOutput1, GregTech_API.sRecipeFile.get("fuel_" + aType, aInput1, aEU), aType);
return true;
}
@@ -143,7 +143,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
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);
+ Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, new ItemStack[]{aItemA, aItemB}, aOutputItems.clone(), null, null, null, aDuration, aEUt, 0);
RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB, aFluid, aOutputFluid, aOutputItems, aDuration, aEUt);
return true;
}
@@ -159,7 +159,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
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);
+ Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, new ItemStack[]{aItemA, aItemB}, aOutputItems.clone(), null, null, null, aDuration, aEUt, 0);
RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB, null, null, aOutputItems, aDuration, aEUt);
return true;
}
@@ -172,7 +172,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
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);
+ Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutput.clone(), null, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0);
RECIPEHANDLER_Dehydrator.debug5(aInput, null, aFluid, null, aOutput, aDuration, aEUt);
return true;
}
diff --git a/src/Java/miscutil/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java b/src/Java/miscutil/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java
new file mode 100644
index 0000000000..9cab3c2549
--- /dev/null
+++ b/src/Java/miscutil/xmod/gregtech/recipes/machines/RECIPEHANDLER_Dehydrator.java
@@ -0,0 +1,81 @@
+package miscutil.xmod.gregtech.recipes.machines;
+
+import miscutil.core.util.Utils;
+import miscutil.core.util.item.UtilsItems;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+public class RECIPEHANDLER_Dehydrator {
+
+ public static void debug1(){
+ Utils.LOG_WARNING("==================================================================================");
+ Utils.LOG_WARNING("==================================================================================");
+ Utils.LOG_WARNING("==================================================================================");
+ Utils.LOG_WARNING("Walking Through Chemical Dehydrator Recipe Creation.");
+ Utils.LOG_WARNING("My name is Willus and I will be your humble host.");
+ }
+ public static void debug2(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt){
+ Utils.LOG_WARNING("==================================================================================");
+ Utils.LOG_WARNING("Taking a step forward.");
+ Utils.LOG_WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null");
+ Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Utils.LOG_WARNING("Passed.");
+ }
+ public static void debug3(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt){
+ Utils.LOG_WARNING("==================================================================================");
+ Utils.LOG_WARNING("Taking a step forward.");
+ Utils.LOG_WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)");
+ Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Utils.LOG_WARNING("Passed.");
+ }
+ public static void debug4(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt){
+ Utils.LOG_WARNING("==================================================================================");
+ Utils.LOG_WARNING("Taking a step forward.");
+ Utils.LOG_WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)");
+ Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Utils.LOG_WARNING("Passed.");
+ Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
+
+ }
+ public static void debug5(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack[] aOutput, int aDuration, int aEUt){
+
+ String inputAname;
+ String inputBname;
+ String inputFluidname;
+ String outputFluidName;
+
+ if (aInput1 != null){
+ inputAname = aInput1.getDisplayName();
+ }
+ else {
+ inputAname = "null";
+ }
+
+ if (aInput2 != null){
+ inputBname = aInput2.getDisplayName();
+ }
+ else {
+ inputBname = "null";
+ }
+
+ if (aFluidInput != null){
+ inputFluidname = aFluidInput.getFluid().getName();
+ }
+ else {
+ inputFluidname = "null";
+ }
+
+ if (aFluidOutput != null){
+ outputFluidName = aFluidOutput.getFluid().getName();
+ }
+ else {
+ outputFluidName = "null";
+ }
+
+ Utils.LOG_INFO("Successfully added a Chemical Dehydrator recipe for: "+UtilsItems.getArrayStackNames(aOutput)+" & "+outputFluidName+", Using "+inputAname+" & "+inputBname+" & liquid "+inputFluidname+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t.");
+ Utils.LOG_WARNING("==================================================================================");
+ Utils.LOG_WARNING("==================================================================================");
+ Utils.LOG_WARNING("==================================================================================");
+ }
+
+}