fix that null exception
This commit is contained in:
parent
7e3aa6efdd
commit
47e1c67bd8
@ -51,5 +51,10 @@ public enum PathingCommandType {
|
|||||||
* <p>
|
* <p>
|
||||||
* Cancel the current path if the goals are not equal
|
* Cancel the current path if the goals are not equal
|
||||||
*/
|
*/
|
||||||
FORCE_REVALIDATE_GOAL_AND_PATH
|
FORCE_REVALIDATE_GOAL_AND_PATH,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Go and ask the next process what to do
|
||||||
|
*/
|
||||||
|
DEFER
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ public class BackfillProcess extends BaritoneProcessHelper {
|
|||||||
return new PathingCommand(null, PathingCommandType.REQUEST_PAUSE);
|
return new PathingCommand(null, PathingCommandType.REQUEST_PAUSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null; // cede to other process
|
return new PathingCommand(null, PathingCommandType.DEFER); // cede to other process
|
||||||
}
|
}
|
||||||
|
|
||||||
public void amIBreakingABlockHMMMMMMM() {
|
public void amIBreakingABlockHMMMMMMM() {
|
||||||
@ -119,7 +119,7 @@ public class BackfillProcess extends BaritoneProcessHelper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLostControl() {
|
public void onLostControl() {
|
||||||
blocksToReplace = new HashMap<>();
|
blocksToReplace.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -199,11 +199,11 @@ public class PathingControlManager implements IPathingControlManager {
|
|||||||
|
|
||||||
PathingCommand exec = proc.onTick(Objects.equals(proc, inControlLastTick) && baritone.getPathingBehavior().calcFailedLastTick(), baritone.getPathingBehavior().isSafeToCancel());
|
PathingCommand exec = proc.onTick(Objects.equals(proc, inControlLastTick) && baritone.getPathingBehavior().calcFailedLastTick(), baritone.getPathingBehavior().isSafeToCancel());
|
||||||
if (exec == null) {
|
if (exec == null) {
|
||||||
/*if (proc.isActive()) {
|
if (proc.isActive()) {
|
||||||
throw new IllegalStateException(proc.displayName() + " returned null PathingCommand");
|
throw new IllegalStateException(proc.displayName() + " actively returned null PathingCommand");
|
||||||
}
|
}
|
||||||
proc.onLostControl();*/
|
// no need to call onLostControl; they are reporting inactive.
|
||||||
} else {
|
} else if (exec.commandType != PathingCommandType.DEFER) {
|
||||||
inControlThisTick = proc;
|
inControlThisTick = proc;
|
||||||
if (!proc.isTemporary()) {
|
if (!proc.isTemporary()) {
|
||||||
iterator.forEachRemaining(IBaritoneProcess::onLostControl);
|
iterator.forEachRemaining(IBaritoneProcess::onLostControl);
|
||||||
|
Loading…
Reference in New Issue
Block a user