mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 06:32:17 -07:00
Pathfinder hasPath should check if path is done. (#9231)
This commit is contained in:
@@ -54,14 +54,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean hasPath() {
|
+ public boolean hasPath() {
|
||||||
+ return entity.getNavigation().getPath() != null;
|
+ return entity.getNavigation().getPath() != null && !entity.getNavigation().getPath().isDone();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Nullable
|
+ @Nullable
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public PathResult getCurrentPath() {
|
+ public PathResult getCurrentPath() {
|
||||||
+ Path path = entity.getNavigation().getPath();
|
+ Path path = entity.getNavigation().getPath();
|
||||||
+ return path != null ? new PaperPathResult(path) : null;
|
+ return path != null && !path.isDone() ? new PaperPathResult(path) : null;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Nullable
|
+ @Nullable
|
||||||
|
Reference in New Issue
Block a user