From 473ff19d9f531e504c2750d24d83fef5a055d72b Mon Sep 17 00:00:00 2001 From: Gero Date: Thu, 19 Sep 2024 13:02:53 +0200 Subject: [PATCH] 24w38a --- .../java/com/velocitypowered/api/network/ProtocolVersion.java | 2 +- .../proxy/protocol/packet/ServerLoginSuccessPacket.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java b/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java index 0bded6200..258562ed1 100644 --- a/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java +++ b/api/src/main/java/com/velocitypowered/api/network/ProtocolVersion.java @@ -88,7 +88,7 @@ public enum ProtocolVersion implements Ordered { MINECRAFT_1_20_3(765, "1.20.3", "1.20.4"), MINECRAFT_1_20_5(766, "1.20.5", "1.20.6"), MINECRAFT_1_21(767, "1.21", "1.21.1"), - MINECRAFT_1_21_2(768, 206, "1.21.2"); + MINECRAFT_1_21_2(768, 210, "1.21.2"); private static final int SNAPSHOT_BIT = 30; diff --git a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ServerLoginSuccessPacket.java b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ServerLoginSuccessPacket.java index e311bc488..1e70568f6 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ServerLoginSuccessPacket.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/protocol/packet/ServerLoginSuccessPacket.java @@ -92,7 +92,7 @@ public class ServerLoginSuccessPacket implements MinecraftPacket { if (version.noLessThan(ProtocolVersion.MINECRAFT_1_19)) { properties = ProtocolUtils.readProperties(buf); } - if (version.noLessThan(ProtocolVersion.MINECRAFT_1_20_5)) { + if (version == ProtocolVersion.MINECRAFT_1_20_5 || version == ProtocolVersion.MINECRAFT_1_21) { buf.readBoolean(); } } @@ -123,7 +123,7 @@ public class ServerLoginSuccessPacket implements MinecraftPacket { ProtocolUtils.writeProperties(buf, properties); } } - if (version.noLessThan(ProtocolVersion.MINECRAFT_1_20_5)) { + if (version == ProtocolVersion.MINECRAFT_1_20_5 || version == ProtocolVersion.MINECRAFT_1_21) { buf.writeBoolean(strictErrorHandling); } }