From a12ba29c451aabd0372a971faeeb5a160ce93815 Mon Sep 17 00:00:00 2001 From: Anon Date: Sat, 4 Apr 2026 14:30:44 +0200 Subject: [PATCH] Fixed teams packet crash --- MinecraftClient/Protocol/Handlers/Protocol18.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index d883e65f..0b1f1e80 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -3048,7 +3048,7 @@ namespace MinecraftClient.Protocol.Handlers // nameTagVisibility, collisionRule, color (VarInt), // prefix (component), suffix (component) // method 0/3/4: players list (VarInt count + strings) - // 1.21.9+ (protocol 773): nameTagVisibility and collisionRule are + // 1.21.5+ (protocol 770): nameTagVisibility and collisionRule are // VarInt-encoded enum IDs instead of UTF strings. var teamName = dataTypes.ReadNextString(packetData); var teamMethod = dataTypes.ReadNextByte(packetData); @@ -3067,7 +3067,7 @@ namespace MinecraftClient.Protocol.Handlers teamFriendlyFlags = dataTypes.ReadNextByte(packetData); // nameTagVisibility - if (protocolVersion >= MC_1_21_9_Version) + if (protocolVersion >= MC_1_21_5_Version) { // STREAM_CODEC: 0=always, 1=never, 2=hideForOtherTeams, 3=hideForOwnTeam teamNameTagVisibility = dataTypes.ReadNextVarInt(packetData) switch @@ -3085,7 +3085,7 @@ namespace MinecraftClient.Protocol.Handlers } // collisionRule - if (protocolVersion >= MC_1_21_9_Version) + if (protocolVersion >= MC_1_21_5_Version) { // STREAM_CODEC: 0=always, 1=never, 2=pushOtherTeams, 3=pushOwnTeam teamCollisionRule = dataTypes.ReadNextVarInt(packetData) switch