mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Fixed NPE in dedicated server languages. And fixed logger for main FML event bus.
This commit is contained in:
1 parent
07a2b67b7f
commit
7973984227
2 files changed
+15
-7
No files matched your search
@@ -63,7 +63,14 @@ public class LoadController
|
||||
public LoadController(Loader loader)
|
||||
{
|
||||
this.loader = loader;
|
||||
this.masterChannel = new EventBus("FMLMainChannel");
|
||||
this.masterChannel = new EventBus(new SubscriberExceptionHandler()
|
||||
{
|
||||
@Override
|
||||
public void handleException(Throwable exception, SubscriberExceptionContext context)
|
||||
{
|
||||
FMLLog.log("FMLMainChannel", Level.ERROR, exception, "Could not dispatch event: %s to %s", context.getEvent(), context.getSubscriberMethod());
|
||||
}
|
||||
});
|
||||
this.masterChannel.register(this);
|
||||
|
||||
state = LoaderState.NOINIT;
|
||||
@@ -159,8 +166,8 @@ public class LoadController
|
||||
else
|
||||
{
|
||||
FMLLog.severe("The ForgeModLoader state engine has become corrupted. Probably, a state was missed by and invalid modification to a base class" +
|
||||
"ForgeModLoader depends on. This is a critical error and not recoverable. Investigate any modifications to base classes outside of" +
|
||||
"ForgeModLoader, especially Optifine, to see if there are fixes available.");
|
||||
"ForgeModLoader depends on. This is a critical error and not recoverable. Investigate any modifications to base classes outside of" +
|
||||
"ForgeModLoader, especially Optifine, to see if there are fixes available.");
|
||||
throw new RuntimeException("The ForgeModLoader state engine is invalid");
|
||||
}
|
||||
if (toThrow != null && toThrow instanceof RuntimeException)
|
||||
@@ -327,9 +334,9 @@ public class LoadController
|
||||
return this.state == state;
|
||||
}
|
||||
|
||||
boolean hasReachedState(LoaderState state) {
|
||||
return this.state.ordinal()>=state.ordinal() && this.state!=LoaderState.ERRORED;
|
||||
}
|
||||
boolean hasReachedState(LoaderState state) {
|
||||
return this.state.ordinal()>=state.ordinal() && this.state!=LoaderState.ERRORED;
|
||||
}
|
||||
|
||||
void forceState(LoaderState newState)
|
||||
{
|
||||
|
||||
@@ -256,7 +256,8 @@ public class FMLServerHandler implements IFMLSidedHandler
|
||||
IOUtils.closeQuietly(stream);
|
||||
try
|
||||
{
|
||||
zip.close();
|
||||
if (zip != null)
|
||||
zip.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user