Skip to content

Commit

Permalink
SetExperience: Revert 1.19.3 fields swap (#2430)
Browse files Browse the repository at this point in the history
Seems like it is not swapped when testing in 1.19.3 vanilla/paper server
  • Loading branch information
ReinforceZwei committed Mar 21, 2023
1 parent 0aa117d commit e44ade8
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions MinecraftClient/Protocol/Handlers/Protocol18.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1955,18 +1955,8 @@ internal bool HandlePacket(int packetID, Queue<byte> packetData)
case PacketTypesIn.SetExperience:
float experiencebar = dataTypes.ReadNextFloat(packetData);
int totalexperience, level;

if (protocolVersion >= MC_1_19_3_Version)
{
totalexperience = dataTypes.ReadNextVarInt(packetData);
level = dataTypes.ReadNextVarInt(packetData);
}
else
{
level = dataTypes.ReadNextVarInt(packetData);
totalexperience = dataTypes.ReadNextVarInt(packetData);
}

level = dataTypes.ReadNextVarInt(packetData);
totalexperience = dataTypes.ReadNextVarInt(packetData);
handler.OnSetExperience(experiencebar, level, totalexperience);
break;
case PacketTypesIn.Explosion:
Expand Down

0 comments on commit e44ade8

Please sign in to comment.