mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Fix VarInt too big for player position and look
This commit is contained in:
parent
0529eb5162
commit
6ac3cd90ee
1 changed files with 8 additions and 7 deletions
|
|
@ -226,15 +226,16 @@ namespace MinecraftClient.Protocol.Handlers
|
||||||
handler.OnRespawn();
|
handler.OnRespawn();
|
||||||
break;
|
break;
|
||||||
case PacketIncomingType.PlayerPositionAndLook:
|
case PacketIncomingType.PlayerPositionAndLook:
|
||||||
|
// These always need to be read, since we need the field after them for teleport confirm
|
||||||
|
double x = dataTypes.ReadNextDouble(packetData);
|
||||||
|
double y = dataTypes.ReadNextDouble(packetData);
|
||||||
|
double z = dataTypes.ReadNextDouble(packetData);
|
||||||
|
float yaw = dataTypes.ReadNextFloat(packetData);
|
||||||
|
float pitch = dataTypes.ReadNextFloat(packetData);
|
||||||
|
byte locMask = dataTypes.ReadNextByte(packetData);
|
||||||
|
|
||||||
if (handler.GetTerrainEnabled())
|
if (handler.GetTerrainEnabled())
|
||||||
{
|
{
|
||||||
double x = dataTypes.ReadNextDouble(packetData);
|
|
||||||
double y = dataTypes.ReadNextDouble(packetData);
|
|
||||||
double z = dataTypes.ReadNextDouble(packetData);
|
|
||||||
float yaw = dataTypes.ReadNextFloat(packetData);
|
|
||||||
float pitch = dataTypes.ReadNextFloat(packetData);
|
|
||||||
byte locMask = dataTypes.ReadNextByte(packetData);
|
|
||||||
|
|
||||||
if (protocolversion >= MC18Version)
|
if (protocolversion >= MC18Version)
|
||||||
{
|
{
|
||||||
Location location = handler.GetCurrentLocation();
|
Location location = handler.GetCurrentLocation();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue