Fix x motion being applied to y (#1089)

This commit is contained in:
altrisi authored and GitHub committed 2021-09-03 22:48:28 -03:00
1 parent 9f30c47f19
commit 19c1924a26
1 file changed
+1 -1
@@ -1088,7 +1088,7 @@ public class EntityValue extends Value
}
List<Value> coords = ((ListValue) v).getItems();
double dx = NumericValue.asNumber(coords.get(0)).getDouble();
double dy = NumericValue.asNumber(coords.get(0)).getDouble();
double dy = NumericValue.asNumber(coords.get(1)).getDouble();
double dz = NumericValue.asNumber(coords.get(2)).getDouble();
e.setVelocity(dx, dy, dz);
updateVelocity(e, MathHelper.absMax(MathHelper.absMax(dx, dy), dz));