Fix up Package.getPackage(), also fix up loadcontroller construction
This commit is contained in:
parent
3918c5e810
commit
ff18294591
2 changed files with 10 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue