don't sprint if allowSprint is false

This commit is contained in:
Leijurv 2018-08-25 15:34:19 -07:00
parent 199d69d79c
commit 879d72d715
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 4 additions and 2 deletions

View File

@ -17,6 +17,7 @@
package baritone.pathing.movement.movements;
import baritone.Baritone;
import baritone.pathing.movement.CalculationContext;
import baritone.pathing.movement.Movement;
import baritone.pathing.movement.MovementHelper;
@ -62,7 +63,7 @@ public class MovementDiagonal extends Movement {
state.setStatus(MovementState.MovementStatus.SUCCESS);
return state;
}
if (!BlockStateInterface.isLiquid(playerFeet())) {
if (!BlockStateInterface.isLiquid(playerFeet()) && Baritone.settings().allowSprint.get()) {
player().setSprinting(true);
}
MovementHelper.moveTowards(state, dest);

View File

@ -17,6 +17,7 @@
package baritone.pathing.movement.movements;
import baritone.Baritone;
import baritone.behavior.impl.LookBehaviorUtils;
import baritone.pathing.movement.CalculationContext;
import baritone.pathing.movement.Movement;
@ -174,7 +175,7 @@ public class MovementTraverse extends Movement {
state.setStatus(MovementState.MovementStatus.SUCCESS);
return state;
}
if (wasTheBridgeBlockAlwaysThere && !BlockStateInterface.isLiquid(playerFeet())) {
if (wasTheBridgeBlockAlwaysThere && !BlockStateInterface.isLiquid(playerFeet()) && Baritone.settings().allowSprint.get()) {
player().setSprinting(true);
}
Block destDown = BlockStateInterface.get(dest.down()).getBlock();