Fix forge handshake being reordered by MarkerProcessor (fixes #253)

For one, the forge handshake takes place *after* login phase (but before the
JoinGame packet), so we must ensure that the SquashFilter does not reorder
those.
Secondly, we were ignoring the initial packet (timestamp = 0) in marker
processor when it should have been passed to the SquashFilter. This was not an
issue before cause the SquashFilter did not rely on it. Now however the
SquashFilter needs to be able to see a login phase packet, so it knows that the
following packets till the JoinGame packet are part of the forge handshake.

In ReplayStudio:
20b5183 Fix forge handshake being reordered to after the JoinGame packet
This commit is contained in:
Jonas Herzig
2020-07-13 17:19:21 +02:00
parent 88fab6a91d
commit d8e4b89413
2 changed files with 2 additions and 2 deletions

View File

@@ -163,7 +163,7 @@ public class MarkerProcessor {
boolean hasFurtherOutputs = outputFileSuffixes.hasNext(); boolean hasFurtherOutputs = outputFileSuffixes.hasNext();
while (nextPacket != null) { while (nextPacket != null) {
if (nextMarker != null && nextPacket.getTime() > nextMarker.getTime()) { if (nextMarker != null && nextPacket.getTime() >= nextMarker.getTime()) {
if (MARKER_NAME_START_CUT.equals(nextMarker.getName())) { if (MARKER_NAME_START_CUT.equals(nextMarker.getName())) {
if (cutFilter != null) { if (cutFilter != null) {
cutFilter.release(); cutFilter.release();

View File

@@ -292,7 +292,7 @@ dependencies {
shadow 'com.github.ReplayMod.JavaBlend:2.79.0:a0696f8' shadow 'com.github.ReplayMod.JavaBlend:2.79.0:a0696f8'
shadow "com.github.ReplayMod:ReplayStudio:fc8a66d", shadeExclusions shadow "com.github.ReplayMod:ReplayStudio:20b5183", shadeExclusions
implementation(jGui){ implementation(jGui){
transitive = false // FG 1.2 puts all MC deps into the compile configuration and we don't want to shade those transitive = false // FG 1.2 puts all MC deps into the compile configuration and we don't want to shade those