Fix LoginCompressionS2CPacket being recorded in replay file on 1.13+

This commit is contained in:
Jonas Herzig
2019-07-19 18:19:55 +02:00
parent 08f09dca6e
commit 5bd9b0cb6b
3 changed files with 9 additions and 2 deletions

View File

@@ -46,6 +46,7 @@ import net.minecraft.client.network.packet.LoginSuccessS2CPacket;
//#endif
//#if MC>=10800
import net.minecraft.client.network.packet.LoginCompressionS2CPacket;
import net.minecraft.network.NetworkSide;
//#endif
@@ -152,8 +153,12 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
metaData.setPlayers(uuids.toArray(new String[uuids.size()]));
saveMetaData();
}
//#if MC<10904
//#if MC>=10800
if (packet instanceof LoginCompressionS2CPacket) {
return; // Replay data is never compressed on the packet level
}
//#if MC<10904
//$$ if (packet instanceof S46PacketSetCompressionLevel) {
//$$ return; // Replay data is never compressed on the packet level
//$$ }