diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-05-15 15:25:56 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-05-15 15:25:56 +1000 |
commit | dce34f9ba22f173b7bf5d7c9669cf29120f14e3a (patch) | |
tree | 9327ac010bcd69c9142b5c8bf2a7bdf332f1a42c /src/Java/miscutil/gregtech/common | |
parent | 83abafec38764fd6f562ce5320fc446ddaad6ff6 (diff) | |
download | GT5-Unofficial-dce34f9ba22f173b7bf5d7c9669cf29120f14e3a.tar.gz GT5-Unofficial-dce34f9ba22f173b7bf5d7c9669cf29120f14e3a.tar.bz2 GT5-Unofficial-dce34f9ba22f173b7bf5d7c9669cf29120f14e3a.zip |
Coking Oven Recipe handler working.
RA wasn't being assigned an instance of GregtechRecipeAdder, which is now fixed in CORE
Diffstat (limited to 'src/Java/miscutil/gregtech/common')
-rw-r--r-- | src/Java/miscutil/gregtech/common/GregtechRecipeAdder.java | 62 |
1 files changed, 49 insertions, 13 deletions
diff --git a/src/Java/miscutil/gregtech/common/GregtechRecipeAdder.java b/src/Java/miscutil/gregtech/common/GregtechRecipeAdder.java index e81080aaa2..8a4e7a1833 100644 --- a/src/Java/miscutil/gregtech/common/GregtechRecipeAdder.java +++ b/src/Java/miscutil/gregtech/common/GregtechRecipeAdder.java @@ -1,6 +1,7 @@ package miscutil.gregtech.common; import gregtech.api.GregTech_API; +import miscutil.core.util.Utils; import miscutil.gregtech.api.interfaces.internal.IGregtech_RecipeAdder; import miscutil.gregtech.api.util.GregtechRecipe; import net.minecraft.item.ItemStack; @@ -16,19 +17,54 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { GregtechRecipe.Gregtech_Recipe_Map.sCokeOvenRecipes.addRecipe(aOptimize, aInputs, aOutputs, aSpecial, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue); return true; }*/ - + @Override public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) { - if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aFluidOutput == null))) { - return false; - } - if ((aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aOutput, aDuration)) <= 0)) { - return false; - } - if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) { - return false; - } - 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); - return true; - } + Utils.LOG_INFO("=================================================================================="); + Utils.LOG_INFO("=================================================================================="); + Utils.LOG_INFO("=================================================================================="); + Utils.LOG_INFO("=================================================================================="); + Utils.LOG_INFO("=================================================================================="); + Utils.LOG_INFO("Walking Through CokeOven Recipe Creation."); + Utils.LOG_INFO("My name is Ralph and I will be your humble host."); + if (((aInput1 == null) /*&& (aFluidInput == null)*/) || ((aOutput == null) && (aFluidOutput == null))) { + Utils.LOG_INFO("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Utils.LOG_INFO("Something was null, returning false"); + return false; + } + Utils.LOG_INFO("=================================================================================="); + Utils.LOG_INFO("Taking a step forward."); + Utils.LOG_INFO("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null"); + Utils.LOG_INFO("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Utils.LOG_INFO("Passed."); + if ((aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aOutput, aDuration)) <= 0)) { + Utils.LOG_INFO("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Utils.LOG_INFO("Something was null, returning false"); + return false; + } + Utils.LOG_INFO("=================================================================================="); + Utils.LOG_INFO("Taking a step forward."); + Utils.LOG_INFO("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)"); + Utils.LOG_INFO("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Utils.LOG_INFO("Passed."); + if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) { + Utils.LOG_INFO("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Utils.LOG_INFO("Something was null, returning false"); + return false; + } + Utils.LOG_INFO("=================================================================================="); + Utils.LOG_INFO("Taking a step forward."); + Utils.LOG_INFO("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)"); + Utils.LOG_INFO("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + Utils.LOG_INFO("Passed."); + Utils.LOG_INFO("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt); + 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); + Utils.LOG_INFO("Successfully added a Coke Oven recipe for: "+aOutput.getDisplayName()+" & "+aFluidOutput.getFluid().getName()+", Using "+aInput1.getDisplayName()+", "+aInput2.getDisplayName()+", "+aFluidInput.getFluid().getName()); + Utils.LOG_INFO("=================================================================================="); + Utils.LOG_INFO("=================================================================================="); + Utils.LOG_INFO("=================================================================================="); + Utils.LOG_INFO("=================================================================================="); + Utils.LOG_INFO("=================================================================================="); + return true; + } } |