From fdbd77c33da40fc4cbb9e05003c22d3910397b5e Mon Sep 17 00:00:00 2001 From: Milutinke Date: Fri, 19 Aug 2022 22:47:21 +0200 Subject: [PATCH] Fixed the crash on Respawn packet. Again the Dimension Type dictionary was not instantiated. --- MinecraftClient/Protocol/Handlers/Protocol18.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index c1f45e64..ecb3dfed 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -450,7 +450,10 @@ namespace MinecraftClient.Protocol.Handlers if (protocolversion >= MC_1_16_Version) { if (protocolversion >= MC_1_19_Version) + { dataTypes.ReadNextString(packetData); // Dimension Type: Identifier + dimensionTypeInRespawn = new Dictionary(); + } else if (protocolversion >= MC_1_16_2_Version) dimensionTypeInRespawn = dataTypes.ReadNextNbt(packetData); // Dimension Type: NBT Tag Compound else