dont jump while using an item, fixes #222

This commit is contained in:
Leijurv 2018-10-14 10:38:47 -07:00
parent 6fdf845349
commit c1076461e2
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -27,7 +27,9 @@ import baritone.pathing.movement.CalculationContext;
import baritone.pathing.movement.Movement;
import baritone.pathing.movement.MovementHelper;
import baritone.pathing.movement.MovementState;
import baritone.utils.*;
import baritone.utils.BlockStateInterface;
import baritone.utils.Helper;
import baritone.utils.InputOverrideHandler;
import baritone.utils.pathing.MutableMoveResult;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
@ -179,6 +181,10 @@ public class MovementParkour extends Movement {
if (state.getStatus() != MovementStatus.RUNNING) {
return state;
}
if (player().isHandActive()) {
logDebug("Pausing parkour since hand is active");
return state;
}
if (dist >= 4) {
state.setInput(InputOverrideHandler.Input.SPRINT, true);
}