From 00ac30015d13111182aacd95d03435fc3aea203e Mon Sep 17 00:00:00 2001 From: Richard Hendricks Date: Thu, 14 Sep 2017 23:18:30 -0500 Subject: Added cleanroom debug messages. Enable debug messages in gregtech.cfg --- .../implementations/GT_MetaTileEntity_BasicMachine.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/java/gregtech/api') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java index 2ecdd039a1..5b6b2367c9 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java @@ -2,6 +2,7 @@ package gregtech.api.metatileentity.implementations; import gregtech.GT_Mod; import gregtech.api.GregTech_API; +import gregtech.api.util.GT_Log; import gregtech.api.enums.ItemList; import gregtech.api.enums.Textures; import gregtech.api.gui.GT_Container_BasicMachine; @@ -29,6 +30,7 @@ import net.minecraftforge.fluids.IFluidHandler; import java.util.Arrays; import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.GT_Values.debugCleanroom; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -829,7 +831,15 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B if (tRecipe.mSpecialValue == -200 || tRecipe.mSpecialValue == -300) for (int i = 0; i < mOutputItems.length; i++) if (mOutputItems[i] != null && getBaseMetaTileEntity().getRandomNumber(10000) > mCleanroom.mEfficiency) + { + if (debugCleanroom) { + GT_Log.out.println( + "BasicMachine: Voiding output due to efficiency failure. mEfficiency = " + + mCleanroom.mEfficiency + ); + } mOutputItems[i] = null; + } mOutputFluid = tRecipe.getFluidOutput(0); if(!skipOC){ calculateOverclockedNess(tRecipe); -- cgit From 747b7a40ba77dcbcbef78cbb8eda802547e9ece7 Mon Sep 17 00:00:00 2001 From: Richard Hendricks Date: Fri, 15 Sep 2017 22:42:49 -0500 Subject: Added debug prints for cleanroom issues. --- src/main/java/gregtech/GT_Mod.java | 1 + src/main/java/gregtech/api/enums/GT_Values.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 3d6bae86dc..edb27a03ad 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -188,6 +188,7 @@ public class GT_Mod implements IGT_Mod { GT_Log.out.println("GT_Mod: Setting Configs"); GT_Values.D1 = tMainConfig.get(aTextGeneral, "Debug", false).getBoolean(false); GT_Values.D2 = tMainConfig.get(aTextGeneral, "Debug2", false).getBoolean(false); + GT_Values.debugCleanroom = tMainConfig.get(aTextGeneral, "debugCleanroom", false).getBoolean(false); GregTech_API.TICKS_FOR_LAG_AVERAGING = tMainConfig.get(aTextGeneral, "TicksForLagAveragingWithScanner", 25).getInt(25); GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = tMainConfig.get(aTextGeneral, "MillisecondsPassedInGTTileEntityUntilLagWarning", 100).getInt(100); diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java index 041ff1d618..27341027f7 100644 --- a/src/main/java/gregtech/api/enums/GT_Values.java +++ b/src/main/java/gregtech/api/enums/GT_Values.java @@ -117,6 +117,10 @@ public class GT_Values { * For Internal Usage (Network) */ public static IGT_NetworkHandler NW; + /** + * Debug parameter for cleanroom testing. + */ + public static boolean debugCleanroom = false; /** * Not really Constants, but they set using the Config and therefore should be constant (those are for the Debug Mode) */ @@ -125,4 +129,4 @@ public class GT_Values { * If you have to give something a World Parameter but there is no World... (Dummy World) */ public static World DW; -} \ No newline at end of file +} -- cgit