From 6056c760d49de7527b87dd2c7c608edbf98244ec Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 31 Aug 2012 23:41:29 -0400 Subject: [PATCH] Log a big fat warning for the developer in the case the network version is not acceptable to the mod itself. (This can happen because of a bad range specifier for example) --- .../mods/fml/common/network/NetworkModHandler.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fml/common/cpw/mods/fml/common/network/NetworkModHandler.java b/fml/common/cpw/mods/fml/common/network/NetworkModHandler.java index b29606286..e5f5b23a1 100644 --- a/fml/common/cpw/mods/fml/common/network/NetworkModHandler.java +++ b/fml/common/cpw/mods/fml/common/network/NetworkModHandler.java @@ -91,6 +91,17 @@ public class NetworkModHandler } } + FMLLog.finest("Testing mod %s to very it can accept it's own version in a remote connection", container.getModId()); + boolean acceptsSelf = acceptVersion(container.getVersion()); + if (!acceptsSelf) + { + FMLLog.severe("The mod %s appears to reject it's own version number (%s) in it's version handling. This is likely a severe bug in the mod!", container.getModId(), container.getVersion()); + } + else + { + FMLLog.finest("The mod %s accepts it's own version (%s)", container.getModId(), container.getVersion()); + } + tryCreatingPacketHandler(container, mod.packetHandler(), mod.channels(), null); if (FMLCommonHandler.instance().getSide().isClient()) {