1
0
Fork 0

Stop using JSONArray getFloat method

The new one seems to try casting the object to a float, causing it to
crash when users join the game. That is obviously bad, so let's not do
it.
This commit is contained in:
Ryan Fox 2020-05-29 15:51:31 +00:00
parent ca4acc3011
commit 6ec1d2fd67
Signed by: flewkey
GPG Key ID: 94F56ADFD848851E
1 changed files with 2 additions and 2 deletions

View File

@ -21,8 +21,8 @@ public class PlayerPosition {
this.x = data.getDouble(0);
this.y = data.getDouble(1);
this.z = data.getDouble(2);
this.yaw = data.getFloat(3);
this.pitch = data.getFloat(4);
this.yaw = data.getNumber(3).floatValue();
this.pitch = data.getNumber(4).floatValue();
this.dimensiontype = DimensionType.byRawId(dimension_id);
}
}