double stance = buffer.readDouble();
double z = buffer.readDouble();
float rotation = buffer.readFloat();
float pitch = buffer.readFloat();
boolean onGround = buffer.readByte() == 1;
return new PositionRotationMessage(x, y, z, stance, rotation, pitch, onGround);
}