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