mirror of
https://github.com/GTNewHorizons/waila.git
synced 2026-11-21 20:52:40 +00:00
Convert world unload event handler to public inner class (#17)
This commit is contained in:
1 parent
7d72e0680e
commit
bc46b8840d
1 file changed
+8
-7
@@ -65,13 +65,7 @@ public class ProxyClient extends ProxyServer {
|
||||
ModuleRegistrar.instance().registerTooltipRenderer("waila.stack", new TTRenderStack());
|
||||
ModuleRegistrar.instance().registerTooltipRenderer("waila.progress", new TTRenderProgressBar());
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new Object() {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onWorldUnload(WorldEvent.Unload event) {
|
||||
DataAccessorCommon.instance = new DataAccessorCommon();
|
||||
}
|
||||
});
|
||||
MinecraftForge.EVENT_BUS.register(new WorldUnloadEventHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,4 +75,11 @@ public class ProxyClient extends ProxyServer {
|
||||
return this.minecraftiaFont;
|
||||
}
|
||||
|
||||
public static class WorldUnloadEventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onWorldUnload(WorldEvent.Unload event) {
|
||||
DataAccessorCommon.instance = new DataAccessorCommon();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user