mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Try fix 1.19+ dimension processing
This commit is contained in:
parent
206a5f1e72
commit
26bc6f16c0
1 changed files with 10 additions and 3 deletions
|
|
@ -608,11 +608,12 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PacketTypesIn.Respawn:
|
case PacketTypesIn.Respawn:
|
||||||
|
string? dimensionTypeNameRespawn = null;
|
||||||
Dictionary<string, object>? dimensionTypeRespawn = null;
|
Dictionary<string, object>? dimensionTypeRespawn = null;
|
||||||
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
|
dimensionTypeNameRespawn = dataTypes.ReadNextString(packetData); // Dimension Type: Identifier
|
||||||
else if (protocolVersion >= MC_1_16_2_Version)
|
else if (protocolVersion >= MC_1_16_2_Version)
|
||||||
dimensionTypeRespawn = dataTypes.ReadNextNbt(packetData); // Dimension Type: NBT Tag Compound
|
dimensionTypeRespawn = dataTypes.ReadNextNbt(packetData); // Dimension Type: NBT Tag Compound
|
||||||
else
|
else
|
||||||
|
|
@ -629,9 +630,15 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
string dimensionName = dataTypes.ReadNextString(packetData); // Dimension Name (World Name) - 1.16 and above
|
string dimensionName = dataTypes.ReadNextString(packetData); // Dimension Name (World Name) - 1.16 and above
|
||||||
if (handler.GetTerrainEnabled())
|
if (handler.GetTerrainEnabled())
|
||||||
{
|
{
|
||||||
if (protocolVersion >= MC_1_16_2_Version && protocolVersion < MC_1_19_Version)
|
if (protocolVersion >= MC_1_16_2_Version && protocolVersion <= MC_1_18_2_Version)
|
||||||
|
{
|
||||||
World.StoreOneDimension(dimensionName, dimensionTypeRespawn!);
|
World.StoreOneDimension(dimensionName, dimensionTypeRespawn!);
|
||||||
World.SetDimension(dimensionName);
|
World.SetDimension(dimensionName);
|
||||||
|
}
|
||||||
|
else if (protocolVersion >= MC_1_19_Version)
|
||||||
|
{
|
||||||
|
World.SetDimension(dimensionTypeNameRespawn!);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue