mirror of https://github.com/cabaletta/baritone
fix
This commit is contained in:
parent
e11e3dfd86
commit
30408384c6
|
@ -53,8 +53,10 @@ public interface IPathingBehavior extends IBehavior {
|
||||||
* Cancels the pathing behavior or the current path calculation. Also cancels all processes that could be controlling path.
|
* Cancels the pathing behavior or the current path calculation. Also cancels all processes that could be controlling path.
|
||||||
* <p>
|
* <p>
|
||||||
* Basically, "MAKE IT STOP".
|
* Basically, "MAKE IT STOP".
|
||||||
|
*
|
||||||
|
* @return whether or not the pathing behavior was canceled. All processes are guaranteed to be canceled, but the PathingBehavior might be in the middle of an uncancelable action like a parkour jump
|
||||||
*/
|
*/
|
||||||
void cancelEverything();
|
boolean cancelEverything();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current path, from the current path executor, if there is one.
|
* Returns the current path, from the current path executor, if there is one.
|
||||||
|
|
|
@ -254,9 +254,13 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancelEverything() {
|
public boolean cancelEverything() {
|
||||||
secretInternalSegmentCancel();
|
boolean doIt = isSafeToCancel();
|
||||||
|
if (doIt) {
|
||||||
|
secretInternalSegmentCancel();
|
||||||
|
}
|
||||||
baritone.getPathingControlManager().cancelEverything();
|
baritone.getPathingControlManager().cancelEverything();
|
||||||
|
return doIt;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean calcFailedLastTick() { // NOT exposed on public api
|
public boolean calcFailedLastTick() { // NOT exposed on public api
|
||||||
|
@ -275,6 +279,7 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior,
|
||||||
|
|
||||||
public void forceCancel() { // NOT exposed on public api
|
public void forceCancel() { // NOT exposed on public api
|
||||||
cancelEverything();
|
cancelEverything();
|
||||||
|
secretInternalSegmentCancel();
|
||||||
isPathCalcInProgress = false;
|
isPathCalcInProgress = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class GetToBlockProcess extends BaritoneProcessHelper implements IGetToBl
|
||||||
if (goal.isInGoal(playerFeet())) {
|
if (goal.isInGoal(playerFeet())) {
|
||||||
onLostControl();
|
onLostControl();
|
||||||
}
|
}
|
||||||
return new PathingCommand(goal, PathingCommandType.SET_GOAL_AND_PATH);
|
return new PathingCommand(goal, PathingCommandType.REVALIDATE_GOAL_AND_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue