diff --git a/src/tconstruct/TConstruct.java b/src/tconstruct/TConstruct.java index a2eaf52d..7e3cc1b9 100644 --- a/src/tconstruct/TConstruct.java +++ b/src/tconstruct/TConstruct.java @@ -76,13 +76,7 @@ public class TConstruct TConstruct.logger.info("[TConstruct] Preparing to take over the world"); } - if (Loader.isModLoaded("gregtech_addon")) { - List modIds = new ArrayList(); - modIds.add("gregtech_addon"); - - ICrashCallable callable = new CallableUnsuppConfig(modIds); - FMLCommonHandler.instance().registerCrashCallable(callable); - } + EnvironmentChecks.verifyEnvironmentSanity(); } @EventHandler diff --git a/src/tconstruct/util/EnvironmentChecks.java b/src/tconstruct/util/EnvironmentChecks.java new file mode 100644 index 00000000..f011209b --- /dev/null +++ b/src/tconstruct/util/EnvironmentChecks.java @@ -0,0 +1,27 @@ +package tconstruct.util; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.ICrashCallable; +import cpw.mods.fml.common.Loader; + +import java.util.ArrayList; +import java.util.List; + +public class EnvironmentChecks { + + private EnvironmentChecks() {} // Singleton + + /** + * Checks for conflicting stuff in environment; adds callable to any crash logs if so. + */ + public static void verifyEnvironmentSanity() { + if (Loader.isModLoaded("gregtech_addon")) { + List modIds = new ArrayList(); + modIds.add("gregtech_addon"); + + ICrashCallable callable = new CallableUnsuppConfig(modIds); + FMLCommonHandler.instance().registerCrashCallable(callable); + } + } + +}