From 930fecde235d152e3c0cf173ebb2fa92cfea37fa Mon Sep 17 00:00:00 2001 From: Anon Date: Sat, 25 Mar 2023 21:24:15 +0100 Subject: [PATCH] Fixed a crash on 1.15.X, 1.14.X --- MinecraftClient/Protocol/Handlers/DataTypes.cs | 8 +------- MinecraftClient/Protocol/Handlers/PacketType18Handler.cs | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/MinecraftClient/Protocol/Handlers/DataTypes.cs b/MinecraftClient/Protocol/Handlers/DataTypes.cs index 961512da..1300b1eb 100644 --- a/MinecraftClient/Protocol/Handlers/DataTypes.cs +++ b/MinecraftClient/Protocol/Handlers/DataTypes.cs @@ -618,8 +618,7 @@ namespace MinecraftClient.Protocol.Handlers } catch (KeyNotFoundException) { - throw new System.IO.InvalidDataException("Unknown Metadata Type ID " + typeId + - ". Is this up to date for new MC Version?"); + throw new System.IO.InvalidDataException("Unknown Metadata Type ID " + typeId + ". Is this up to date for new MC Version?"); } // Value's data type is depended on Type @@ -817,11 +816,6 @@ namespace MinecraftClient.Protocol.Handlers if (protocolversion == Protocol18Handler.MC_1_17_Version || protocolversion == Protocol18Handler.MC_1_17_1_Version) ReadDustParticleColorTransition(cache); break; - case 20: - // 1.13 - 1.14.4 - if (protocolversion < Protocol18Handler.MC_1_15_Version) - ReadNextVarInt(cache); // Block State (minecraft:falling_dust) - break; case 23: // 1.15 - 1.16.5 if (protocolversion >= Protocol18Handler.MC_1_15_Version && protocolversion < Protocol18Handler.MC_1_17_Version) diff --git a/MinecraftClient/Protocol/Handlers/PacketType18Handler.cs b/MinecraftClient/Protocol/Handlers/PacketType18Handler.cs index 1096a85b..ee2f2afb 100644 --- a/MinecraftClient/Protocol/Handlers/PacketType18Handler.cs +++ b/MinecraftClient/Protocol/Handlers/PacketType18Handler.cs @@ -60,7 +60,7 @@ namespace MinecraftClient.Protocol.Handlers p = new PacketPalette1122(); else if (protocol < Protocol18Handler.MC_1_14_Version) p = new PacketPalette113(); - else if (protocol <= Protocol18Handler.MC_1_15_Version) + else if (protocol < Protocol18Handler.MC_1_15_Version) p = new PacketPalette114(); else if (protocol <= Protocol18Handler.MC_1_15_2_Version) p = new PacketPalette115();