From 4bb25c377e3666cb2681cda7d9d4caa444db4ffb Mon Sep 17 00:00:00 2001 From: oldkingOK Date: Sun, 10 Mar 2024 12:02:22 +0800 Subject: [PATCH] feat(DeclareCommands.cs): Add 1.20.3+ version check --- .../Protocol/Handlers/Packet/s2c/DeclareCommands.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MinecraftClient/Protocol/Handlers/Packet/s2c/DeclareCommands.cs b/MinecraftClient/Protocol/Handlers/Packet/s2c/DeclareCommands.cs index 6824729451..07d37c7207 100644 --- a/MinecraftClient/Protocol/Handlers/Packet/s2c/DeclareCommands.cs +++ b/MinecraftClient/Protocol/Handlers/Packet/s2c/DeclareCommands.cs @@ -96,7 +96,7 @@ public static void Read(DataTypes dataTypes, Queue packetData, int protoco 44 => new ParserResource(dataTypes, packetData), 50 => protocolVersion == Protocol18Handler.MC_1_19_4_Version ? new ParserForgeEnum(dataTypes, packetData) : - new ParserEmpty(dataTypes, packetData), + new ParserEmpty(dataTypes, packetData), 51 => (protocolVersion >= Protocol18Handler.MC_1_20_Version && protocolVersion <= Protocol18Handler.MC_1_20_2_Version) ? // 1.20 - 1.20.2 new ParserForgeEnum(dataTypes, packetData) : @@ -124,6 +124,7 @@ public static void Read(DataTypes dataTypes, Queue packetData, int protoco 43 => new ParserResourceOrTag(dataTypes, packetData), 44 => new ParserResource(dataTypes, packetData), 45 => new ParserResource(dataTypes, packetData), + 52 => new ParserForgeEnum(dataTypes, packetData), _ => new ParserEmpty(dataTypes, packetData), }; }