mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Ensure NetworkConstants is loaded before mod construction (#10407)
This commit is contained in:
1 parent
59979642e9
commit
fa109380f7
3 files changed
+11
-2
No files matched your search
@@ -426,7 +426,6 @@ public class ForgeMod
|
||||
return uuid.toString();
|
||||
});
|
||||
|
||||
LOGGER.debug(FORGEMOD, "Loading Network data for FML net version: {}", NetworkConstants.init());
|
||||
CrashReportCallables.registerCrashCallable("FML", ForgeVersion::getSpec);
|
||||
CrashReportCallables.registerCrashCallable("Forge", ()->ForgeVersion.getGroup()+":"+ForgeVersion.getVersion());
|
||||
|
||||
|
||||
@@ -47,6 +47,11 @@ public class NetworkHooks
|
||||
{
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
public static void init()
|
||||
{
|
||||
LOGGER.debug("Loading Network data for FML net version: {}", NetworkConstants.init());
|
||||
}
|
||||
|
||||
public static String getFMLVersion(final String ip)
|
||||
{
|
||||
return ip.contains("\0") ? Objects.equals(ip.split("\0")[1], NetworkConstants.NETVERSION) ? NetworkConstants.NETVERSION : ip.split("\0")[1] : NetworkConstants.NOVERSION;
|
||||
|
||||
Reference in new issue
Block a user