From f20ef77a91f2781273b0835207ff4ab46e1c4512 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 11 Aug 2012 16:21:03 -0400 Subject: [PATCH] Fix up the network mod issue properly. Maintain a real cache of mod objects --- fml/common/cpw/mods/fml/common/LoadController.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/fml/common/cpw/mods/fml/common/LoadController.java b/fml/common/cpw/mods/fml/common/LoadController.java index 7184b8b4d8..caa4f22e6c 100644 --- a/fml/common/cpw/mods/fml/common/LoadController.java +++ b/fml/common/cpw/mods/fml/common/LoadController.java @@ -115,6 +115,10 @@ public class LoadController @Subscribe public void propogateStateMessage(FMLStateEvent stateEvent) { + if (stateEvent instanceof FMLPreInitializationEvent) + { + buildModObjectList(); + } for (Map.Entry entry : eventChannels.entrySet()) { activeContainer = entry.getKey(); @@ -132,10 +136,6 @@ public class LoadController modStates.put(entry.getKey(), ModState.ERRORED); } } - if (stateEvent instanceof FMLConstructionEvent) - { - buildModObjectList(); - } } public void buildModObjectList() @@ -143,7 +143,10 @@ public class LoadController ImmutableBiMap.Builder builder = ImmutableBiMap.builder(); for (ModContainer mc : activeModList) { - builder.put(mc, mc.getMod()); + if (!mc.isImmutable()) + { + builder.put(mc, mc.getMod()); + } } modObjectList = builder.build(); }