Fix playback once end has been reached on 1.8 (and some above)
This commit is contained in:
@@ -836,6 +836,10 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
||||
while (paused() && hasWorldLoaded && desiredTimeStamp == -1 && !terminate) {
|
||||
Thread.sleep(10);
|
||||
}
|
||||
|
||||
if (terminate) {
|
||||
break REPLAY_LOOP;
|
||||
}
|
||||
break;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
@@ -1119,6 +1123,9 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
||||
IOUtils.readFully(in, bytes);
|
||||
} else {
|
||||
com.replaymod.replaystudio.PacketData data = in.readPacket();
|
||||
if (data == null) {
|
||||
throw new EOFException();
|
||||
}
|
||||
timestamp = (int) data.getTime();
|
||||
// We need to re-encode MCProtocolLib packets, so we can later decode them as NMS packets
|
||||
// The main reason we aren't reading them as NMS packets is that we want ReplayStudio to be able
|
||||
|
||||
@@ -175,6 +175,9 @@ public class ReplayHandler {
|
||||
//#if MC>=11400
|
||||
mc.disconnect();
|
||||
//#else
|
||||
//$$ // We need to re-set the GUI screen because having one with `allowsUserInput = true` active during world
|
||||
//$$ // load (i.e. before player is set) will crash MC...
|
||||
//$$ mc.displayGuiScreen(new GuiScreen() {});
|
||||
//$$ mc.loadWorld(null);
|
||||
//#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user