mirror of https://github.com/cabaletta/baritone
fix crouching
This commit is contained in:
parent
f5380881f4
commit
e03e251541
|
@ -176,7 +176,7 @@ public class MovementAscend extends Movement {
|
|||
ticksWithoutPlacement++;
|
||||
if (MovementHelper.attemptToPlaceABlock(state, baritone, dest.down(), false) == PlaceResult.READY_TO_PLACE) {
|
||||
state.setInput(Input.SNEAK, true);
|
||||
if (ctx.player().movementInput.field_228350_h_) {
|
||||
if (ctx.player().isCrouching()) {
|
||||
state.setInput(Input.CLICK_RIGHT, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -251,7 +251,7 @@ public class MovementPillar extends Movement {
|
|||
state.setInput(Input.JUMP, false); // breaking is like 5x slower when you're jumping
|
||||
state.setInput(Input.CLICK_LEFT, true);
|
||||
blockIsThere = false;
|
||||
} else if (ctx.player().movementInput.field_228350_h_ && (ctx.isLookingAt(src.down()) || ctx.isLookingAt(src)) && ctx.player().getPositionVec().y > dest.getY() + 0.1) {
|
||||
} else if (ctx.player().isCrouching() && (ctx.isLookingAt(src.down()) || ctx.isLookingAt(src)) && ctx.player().getPositionVec().y > dest.getY() + 0.1) {
|
||||
state.setInput(Input.CLICK_RIGHT, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,7 +286,7 @@ public class MovementTraverse extends Movement {
|
|||
}
|
||||
switch (p) {
|
||||
case READY_TO_PLACE: {
|
||||
if (ctx.player().movementInput.field_228350_h_ || Baritone.settings().assumeSafeWalk.value) {
|
||||
if (ctx.player().isCrouching() || Baritone.settings().assumeSafeWalk.value) {
|
||||
state.setInput(Input.CLICK_RIGHT, true);
|
||||
}
|
||||
return state;
|
||||
|
|
|
@ -445,7 +445,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
|||
BetterBlockPos pos = toBreak.get().getA();
|
||||
baritone.getLookBehavior().updateTarget(rot, true);
|
||||
MovementHelper.switchToBestToolFor(ctx, bcc.get(pos));
|
||||
if (ctx.player().movementInput.field_228350_h_) {
|
||||
if (ctx.player().isCrouching()) {
|
||||
// really horrible bug where a block is visible for breaking while sneaking but not otherwise
|
||||
// so you can't see it, it goes to place something else, sneaks, then the next tick it tries to break
|
||||
// and is unable since it's unsneaked in the intermediary tick
|
||||
|
|
Loading…
Reference in New Issue