Record raw packets instead of re-encoding decoded packets

Until now, recording worked by injecting right before the vanilla packet
handler. At that point it was receiving packet classes and had to re-encode them
to store them in the replay file. However, not all decoded packets can
necessarily be re-encoded without errors, requiring us to have a bunch of
workarounds.

This commit changes the way recording works by injecting right before the
decoder. It therefore receives the raw bytebufs and no longer has to deal with
the re-encode issue.
This commit is contained in:
Jonas Herzig
2022-06-15 13:04:33 +02:00
parent df11ba2e36
commit 13ac8dcf0a
5 changed files with 195 additions and 279 deletions

View File

@@ -8,6 +8,7 @@
"EntityLivingBaseAccessor",
"IntegratedServerAccessor",
"NetworkManagerAccessor",
"MixinClientConnection",
//#if MC<11500
//$$ "SPacketSpawnMobAccessor",
//$$ "SPacketSpawnPlayerAccessor",