18192021222324
double x = buffer.readDouble(); double y = buffer.readDouble(); double stance = buffer.readDouble(); double z = buffer.readDouble(); boolean flying = buffer.readByte() == 1; return new PositionMessage(x, y, z, stance, flying); }