Fix for LoginSuccess packet

This commit is contained in:
BruceChen 2022-09-04 20:44:38 +08:00
parent dfc310b3f2
commit 015d28ec94

View file

@ -1848,7 +1848,11 @@ namespace MinecraftClient.Protocol.Handlers
}
else if (packetID == 0x02) //Login successful
{
Guid uuidReceived = dataTypes.ReadNextUUID(packetData);
Guid uuidReceived;
if (protocolVersion >= Protocol18Handler.MC_1_16_Version)
uuidReceived = dataTypes.ReadNextUUID(packetData);
else
uuidReceived = Guid.Parse(dataTypes.ReadNextString(packetData));
string userName = dataTypes.ReadNextString(packetData);
Tuple<string, string, string>[]? playerProperty = null;
if (protocolVersion >= Protocol18Handler.MC_1_19_Version)