From 0f3289dfdffa8156ae4a1508d52041dd2f2d3984 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 29 Mar 2026 21:16:45 +0000 Subject: [PATCH] Fix criteria version boundary: criteria list removed from wire format in MC 1.20.2, not 1.20.6 Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/5da0ec37-35e2-4aae-b165-66ddd82df985 Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com> --- MinecraftClient/Protocol/Handlers/Protocol18.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index 73c47a59..ac6b3b4f 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -3202,9 +3202,9 @@ namespace MinecraftClient.Protocol.Handlers // Criteria and requirements differ by version var requirements = new List>(); - if (protocolVersion < MC_1_20_6_Version) + if (protocolVersion < MC_1_20_2_Version) { - // Builder-based (pre-1.20.6): criteria names list, then requirements + // Builder-based (pre-1.20.2): criteria names list, then requirements int criteriaCount = dataTypes.ReadNextVarInt(packetData); for (int c = 0; c < criteriaCount; c++) dataTypes.ReadNextString(packetData); // criterion name only, no trigger data