Fix thread-unsafe mc method call in FullReplaySender (fixes #370)
This commit is contained in:
@@ -729,10 +729,12 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
|||||||
final PlayerPositionLookS2CPacket ppl = (PlayerPositionLookS2CPacket) p;
|
final PlayerPositionLookS2CPacket ppl = (PlayerPositionLookS2CPacket) p;
|
||||||
if(!hasWorldLoaded) hasWorldLoaded = true;
|
if(!hasWorldLoaded) hasWorldLoaded = true;
|
||||||
|
|
||||||
if (mc.currentScreen instanceof DownloadingTerrainScreen) {
|
ReplayMod.instance.runLater(() -> {
|
||||||
// Close the world loading screen manually in case we swallow the packet
|
if (mc.currentScreen instanceof DownloadingTerrainScreen) {
|
||||||
mc.openScreen(null);
|
// Close the world loading screen manually in case we swallow the packet
|
||||||
}
|
mc.openScreen(null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if(replayHandler.shouldSuppressCameraMovements()) return null;
|
if(replayHandler.shouldSuppressCameraMovements()) return null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user