don't sprint if hunger is too low

This commit is contained in:
Leijurv 2018-09-04 09:55:56 -07:00
parent 438392840b
commit 424113f052
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -19,10 +19,7 @@ package baritone.pathing.path;
import baritone.Baritone;
import baritone.api.event.events.TickEvent;
import baritone.pathing.movement.ActionCosts;
import baritone.pathing.movement.Movement;
import baritone.pathing.movement.MovementHelper;
import baritone.pathing.movement.MovementState;
import baritone.pathing.movement.*;
import baritone.pathing.movement.movements.MovementDescend;
import baritone.pathing.movement.movements.MovementDiagonal;
import baritone.pathing.movement.movements.MovementFall;
@ -274,7 +271,7 @@ public class PathExecutor implements Helper {
}
private void sprintIfRequested() {
if (!Baritone.settings().allowSprint.get()) {
if (!new CalculationContext().canSprint()) {
player().setSprinting(false);
return;
}