Fixed the crash on Respawn packet. Again the Dimension Type dictionary was not instantiated.

This commit is contained in:
Milutinke 2022-08-19 22:47:21 +02:00
parent 2f90c8a67d
commit fdbd77c33d

View file

@ -450,7 +450,10 @@ namespace MinecraftClient.Protocol.Handlers
if (protocolversion >= MC_1_16_Version) if (protocolversion >= MC_1_16_Version)
{ {
if (protocolversion >= MC_1_19_Version) if (protocolversion >= MC_1_19_Version)
{
dataTypes.ReadNextString(packetData); // Dimension Type: Identifier dataTypes.ReadNextString(packetData); // Dimension Type: Identifier
dimensionTypeInRespawn = new Dictionary<string, object>();
}
else if (protocolversion >= MC_1_16_2_Version) else if (protocolversion >= MC_1_16_2_Version)
dimensionTypeInRespawn = dataTypes.ReadNextNbt(packetData); // Dimension Type: NBT Tag Compound dimensionTypeInRespawn = dataTypes.ReadNextNbt(packetData); // Dimension Type: NBT Tag Compound
else else