Fix replay not being closed properly

This commit is contained in:
johni0702
2016-08-14 15:40:12 +02:00
parent 00c2404345
commit e8df61aeb2
3 changed files with 75 additions and 60 deletions

View File

@@ -111,6 +111,10 @@ public class ReplayHandler {
channel.close().awaitUninterruptibly();
if (mc.thePlayer instanceof CameraEntity) {
mc.thePlayer.setDead();
}
if (mc.theWorld != null) {
mc.theWorld.sendQuittingDisconnectingPacket();
mc.loadWorld(null);
@@ -122,6 +126,8 @@ public class ReplayHandler {
// These might have been hidden by the overlay, so we have to make sure they're visible again
ReplayGuiRegistry.show();
ReplayModReplay.instance.replayHandler = null;
FMLCommonHandler.instance().bus().post(new ReplayCloseEvent.Post(this));
}