mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Try fix 1.19+ dimension processing
This commit is contained in:
parent
223c13561c
commit
a2b2aeb748
2 changed files with 11 additions and 4 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit b4fd7da2595ad54479880fc1c9c6e14975412d92
|
Subproject commit 7acaa0ab31809f0f6512e6a76e53e15441de8e7c
|
||||||
|
|
@ -381,11 +381,12 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
// String identifier: 1.16 and 1.16.1
|
// String identifier: 1.16 and 1.16.1
|
||||||
// varInt: [1.9.1 to 1.15.2]
|
// varInt: [1.9.1 to 1.15.2]
|
||||||
// byte: below 1.9.1
|
// byte: below 1.9.1
|
||||||
|
string? dimensionTypeName = null;
|
||||||
Dictionary<string, object>? dimensionType = null;
|
Dictionary<string, object>? dimensionType = 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
|
dimensionTypeName = dataTypes.ReadNextString(packetData); // Dimension Type: Identifier
|
||||||
else if (protocolVersion >= MC_1_16_2_Version)
|
else if (protocolVersion >= MC_1_16_2_Version)
|
||||||
dimensionType = dataTypes.ReadNextNbt(packetData); // Dimension Type: NBT Tag Compound
|
dimensionType = dataTypes.ReadNextNbt(packetData); // Dimension Type: NBT Tag Compound
|
||||||
else
|
else
|
||||||
|
|
@ -405,9 +406,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, dimensionType!);
|
World.StoreOneDimension(dimensionName, dimensionType!);
|
||||||
World.SetDimension(dimensionName);
|
World.SetDimension(dimensionName);
|
||||||
|
}
|
||||||
|
else if (protocolVersion >= MC_1_19_Version)
|
||||||
|
{
|
||||||
|
World.SetDimension(dimensionTypeName!);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue