Fix inputs overrides not resetting when out of world, fixes #43
This commit is contained in:
parent
8ee65f1212
commit
a9cac7718e
@ -56,8 +56,7 @@ public class PathingBehavior extends Behavior {
|
|||||||
@Override
|
@Override
|
||||||
public void onTick(TickEvent event) {
|
public void onTick(TickEvent event) {
|
||||||
if (event.getType() == TickEvent.Type.OUT) {
|
if (event.getType() == TickEvent.Type.OUT) {
|
||||||
current = null;
|
this.cancel();
|
||||||
next = null;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (current == null) {
|
if (current == null) {
|
||||||
@ -148,7 +147,9 @@ public class PathingBehavior extends Behavior {
|
|||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PathExecutor getNext() {return next;}
|
public PathExecutor getNext() {
|
||||||
|
return next;
|
||||||
|
}
|
||||||
|
|
||||||
public Optional<IPath> getPath() {
|
public Optional<IPath> getPath() {
|
||||||
return Optional.ofNullable(current).map(PathExecutor::getPath);
|
return Optional.ofNullable(current).map(PathExecutor::getPath);
|
||||||
|
Loading…
Reference in New Issue
Block a user