From 5d08726880974be0ff14fb6f5cea2b3649dcada3 Mon Sep 17 00:00:00 2001 From: Ben Spiers Date: Tue, 30 Sep 2014 20:40:18 +0100 Subject: [PATCH] Add config options to blacklist the different power systems. This should help people avoid IC2 problems with console spam, but such a "solution" only relieves the most obvious symptom of chunk-thrashing, it doesn't stop the thrashing itself. --- src/main/java/mekanism/common/CommonProxy.java | 4 ++++ src/main/java/mekanism/common/Mekanism.java | 4 ++++ src/main/java/mekanism/common/util/MekanismUtils.java | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/mekanism/common/CommonProxy.java b/src/main/java/mekanism/common/CommonProxy.java index b5868e4a9..7756cf992 100644 --- a/src/main/java/mekanism/common/CommonProxy.java +++ b/src/main/java/mekanism/common/CommonProxy.java @@ -234,6 +234,10 @@ public class CommonProxy Mekanism.TO_TE = Mekanism.TO_BC*10; Mekanism.FROM_TE = Mekanism.FROM_BC/10; + Mekanism.blacklistBC = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistBuildCraftPower", false).getBoolean(); + Mekanism.blacklistIC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistIC2Power", false).getBoolean(); + Mekanism.blacklistRF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistRFPower", false).getBoolean(); + if(Mekanism.cardboardSpawners) { MekanismAPI.removeBoxBlacklist(Blocks.mob_spawner, 0); diff --git a/src/main/java/mekanism/common/Mekanism.java b/src/main/java/mekanism/common/Mekanism.java index e32c6cf72..56c8d69a0 100644 --- a/src/main/java/mekanism/common/Mekanism.java +++ b/src/main/java/mekanism/common/Mekanism.java @@ -333,6 +333,10 @@ public class Mekanism public static double FROM_TE; public static double FROM_UE = 1/TO_UE; + public static boolean blacklistBC; + public static boolean blacklistIC2; + public static boolean blacklistRF; + //Usage Configuration public static double enrichmentChamberUsage; public static double osmiumCompressorUsage; diff --git a/src/main/java/mekanism/common/util/MekanismUtils.java b/src/main/java/mekanism/common/util/MekanismUtils.java index 7c785ad17..231286482 100644 --- a/src/main/java/mekanism/common/util/MekanismUtils.java +++ b/src/main/java/mekanism/common/util/MekanismUtils.java @@ -1198,7 +1198,7 @@ public final class MekanismUtils */ public static boolean useBuildCraft() { - return Mekanism.hooks.BuildCraftPowerLoaded; + return Mekanism.hooks.BuildCraftPowerLoaded && !Mekanism.blacklistBC; } /** @@ -1208,7 +1208,7 @@ public final class MekanismUtils */ public static boolean useIC2() { - return Mekanism.hooks.IC2Loaded; + return Mekanism.hooks.IC2Loaded && !Mekanism.blacklistIC2; } /** @@ -1218,7 +1218,7 @@ public final class MekanismUtils */ public static boolean useRF() { - return Mekanism.hooks.RedstoneFluxLoaded; + return Mekanism.hooks.RedstoneFluxLoaded && !Mekanism.blacklistRF; } /**