Fixed "Open to LAN" being broken.

This commit is contained in:
FlorianMichael 2023-12-27 23:19:29 +01:00
parent 3b8537119e
commit 04fd1ac510
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126

View File

@ -86,7 +86,7 @@ public abstract class MixinClientConnection extends SimpleChannelInboundHandler<
@Inject(method = "setupEncryption", at = @At("HEAD"), cancellable = true)
private void storeDecryptionCipher(Cipher decryptionCipher, Cipher encryptionCipher, CallbackInfo ci) {
if (this.viaFabricPlus$serverVersion.isOlderThanOrEqualTo(VersionEnum.r1_6_4)) {
if (this.viaFabricPlus$serverVersion != null /* This happens when opening a lan server and people are joining */ && this.viaFabricPlus$serverVersion.isOlderThanOrEqualTo(VersionEnum.r1_6_4)) {
// Minecraft's encryption code is bad for us, we need to reorder the pipeline
ci.cancel();