From fbdf884b96c14cea8f3272d4024c029b48ccda16 Mon Sep 17 00:00:00 2001 From: Prototik Date: Sun, 12 Jul 2015 13:54:53 +0700 Subject: [PATCH] Add option to disable printing client's mod list (close #98) --- .../handshake/FMLHandshakeServerState.java.patch | 15 +++++++++++++++ src/main/java/kcauldron/KCauldronConfig.java | 5 ++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 patches/cpw/mods/fml/common/network/handshake/FMLHandshakeServerState.java.patch diff --git a/patches/cpw/mods/fml/common/network/handshake/FMLHandshakeServerState.java.patch b/patches/cpw/mods/fml/common/network/handshake/FMLHandshakeServerState.java.patch new file mode 100644 index 0000000..8a050e9 --- /dev/null +++ b/patches/cpw/mods/fml/common/network/handshake/FMLHandshakeServerState.java.patch @@ -0,0 +1,15 @@ +--- ../src-base/minecraft/cpw/mods/fml/common/network/handshake/FMLHandshakeServerState.java ++++ ../src-work/minecraft/cpw/mods/fml/common/network/handshake/FMLHandshakeServerState.java +@@ -37,7 +37,11 @@ + } + + FMLHandshakeMessage.ModList client = (FMLHandshakeMessage.ModList)msg; +- FMLLog.info("Client attempting to join with %d mods : %s", client.modListSize(), client.modListAsString()); ++ if (net.minecraft.server.MinecraftServer.kcauldronConfig.loggingClientModList.getValue()) { ++ FMLLog.info("Client attempting to join with %d mods : %s", client.modListSize(), client.modListAsString()); ++ } else { ++ FMLLog.info("Client attempting to join with %d mods", client.modListSize()); ++ } + String result = FMLNetworkHandler.checkModList(client, Side.CLIENT); + if (result != null) + { diff --git a/src/main/java/kcauldron/KCauldronConfig.java b/src/main/java/kcauldron/KCauldronConfig.java index 43a4cc0..b9aed38 100644 --- a/src/main/java/kcauldron/KCauldronConfig.java +++ b/src/main/java/kcauldron/KCauldronConfig.java @@ -24,7 +24,9 @@ public class KCauldronConfig extends ConfigBase { public BoolSetting loggingMaterialInjection = new BoolSetting(this, "logging.materialInjection", false, "Log material injection event"); - + public BoolSetting loggingClientModList = new BoolSetting(this, + "logging.clientModList", true, "Print client's mod list during attempt to join"); + public BoolSetting commonAllowNetherPortal = new BoolSetting(this, "common.allowNetherPortalBesidesOverworld", false, "Allow nether portals in dimensions besides overworld"); @@ -37,6 +39,7 @@ public class KCauldronConfig extends ConfigBase { register(updatecheckerAutorestart); register(updatecheckerQuite); register(loggingMaterialInjection); + register(loggingClientModList); register(commonAllowNetherPortal); load(); }