mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Fix up Package.getPackage(), also fix up loadcontroller construction
This commit is contained in:
1 parent
7c4583c87a
commit
afc2a4a75c
2 files changed
+10
-4
No files matched your search
@@ -46,6 +46,8 @@ public class LoadController
|
||||
this.masterChannel.register(this);
|
||||
|
||||
state = LoaderState.NOINIT;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
@@ -130,18 +132,22 @@ public class LoadController
|
||||
modStates.put(entry.getKey(), ModState.ERRORED);
|
||||
}
|
||||
}
|
||||
if (stateEvent instanceof FMLConstructionEvent)
|
||||
{
|
||||
buildModObjectList();
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void buildModObjectList(FMLConstructionEvent pre)
|
||||
public void buildModObjectList()
|
||||
{
|
||||
com.google.common.collect.ImmutableBiMap.Builder<ModContainer, Object> builder = ImmutableBiMap.<ModContainer, Object>builder();
|
||||
ImmutableBiMap.Builder<ModContainer, Object> builder = ImmutableBiMap.<ModContainer, Object>builder();
|
||||
for (ModContainer mc : activeModList)
|
||||
{
|
||||
builder.put(mc, mc.getMod());
|
||||
}
|
||||
modObjectList = builder.build();
|
||||
}
|
||||
|
||||
public void errorOccurred(ModContainer modContainer, Throwable exception)
|
||||
{
|
||||
errors.put(modContainer.getModId(), exception);
|
||||
|
||||
@@ -80,7 +80,7 @@ public class RelaunchClassLoader extends URLClassLoader
|
||||
try
|
||||
{
|
||||
String pkgname = name.substring(0, name.lastIndexOf('.'));
|
||||
if (Package.getPackage(pkgname)==null)
|
||||
if (getPackage(pkgname)==null)
|
||||
{
|
||||
definePackage(pkgname, null, null, null, null, null, null, null);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user