mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 11:59:25 +00:00
Fix up the network mod issue properly. Maintain a real cache of mod objects
This commit is contained in:
1 parent
204f73cb05
commit
22fe48e477
1 file changed
+8
-5
@@ -115,6 +115,10 @@ public class LoadController
|
||||
@Subscribe
|
||||
public void propogateStateMessage(FMLStateEvent stateEvent)
|
||||
{
|
||||
if (stateEvent instanceof FMLPreInitializationEvent)
|
||||
{
|
||||
buildModObjectList();
|
||||
}
|
||||
for (Map.Entry<String,EventBus> 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<ModContainer, Object> builder = ImmutableBiMap.<ModContainer, Object>builder();
|
||||
for (ModContainer mc : activeModList)
|
||||
{
|
||||
builder.put(mc, mc.getMod());
|
||||
if (!mc.isImmutable())
|
||||
{
|
||||
builder.put(mc, mc.getMod());
|
||||
}
|
||||
}
|
||||
modObjectList = builder.build();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user