Fabric API

Fabric API

106M Downloads

Packet Compression possibly Disabled

Plecra opened this issue ยท 2 comments

commented

@Redirect(method = "acceptPlayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/MinecraftServer;getNetworkCompressionThreshold()I", ordinal = 0))
private int removeLateCompressionPacketSending(MinecraftServer server) {
return -1;
}

This redirect appears to prevent the server from starting the packet compression handshake, so the connection never compresses chunk data. I wasn't able to find any context on why it's needed for the networking code, and the server ran fine with the original implementation replaced.

Is there another piece of code responsible for enabling compression, or is this what it looks like?

commented

It sure does! Thanks for checking that, clearly I need to get a better handle on iDEA's search :D