mirror of
https://github.com/cabaletta/baritone
synced 2024-12-18 21:24:53 +00:00
discard next segment properly
This commit is contained in:
parent
9ecd24c755
commit
b2583773d5
@ -463,8 +463,12 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior,
|
||||
} else {
|
||||
if (next == null) {
|
||||
if (executor.isPresent()) {
|
||||
queuePathEvent(PathEvent.NEXT_SEGMENT_CALC_FINISHED);
|
||||
next = executor.get();
|
||||
if (executor.get().getPath().getSrc().equals(current.getPath().getDest())) {
|
||||
queuePathEvent(PathEvent.NEXT_SEGMENT_CALC_FINISHED);
|
||||
next = executor.get();
|
||||
} else {
|
||||
logDebug("Warning: discarding orphan next segment with incorrect start");
|
||||
}
|
||||
} else {
|
||||
queuePathEvent(PathEvent.NEXT_CALC_FAILED);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user