Food level is ignored for sprinting with getAllowFlight returning true.

This commit is contained in:
asofold 2016-06-13 14:19:41 +02:00
parent e543d905dd
commit 637f94f579

View File

@ -540,7 +540,8 @@ public class MovingListener extends CheckListener implements TickListener, IRemo
final long time = System.currentTimeMillis();
if (player.isSprinting() || cc.assumeSprint) {
// Hard to confine assumesprint further (some logics change with hdist or sprinting).
if (player.getFoodLevel() > 5 || player.isFlying()) {
// TODO: Collect all these properties within a context object (abstraction + avoid re-fetching).
if (player.getFoodLevel() > 5 || player.getAllowFlight() || player.isFlying()) {
data.timeSprinting = time;
data.multSprinting = attributeAccess.getSprintAttributeMultiplier(player);
if (data.multSprinting == Double.MAX_VALUE) {