From 502e9950bf3bbfae30798c40ce3844fadfbeadea Mon Sep 17 00:00:00 2001 From: Roman Alexander Date: Sun, 23 Jul 2023 03:04:19 +0700 Subject: [PATCH] Pathfinder hasPath should check if path is done. (#9231) --- patches/server/Mob-Pathfinding-API.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/Mob-Pathfinding-API.patch b/patches/server/Mob-Pathfinding-API.patch index 70ca818c8f..4b7a40cdb9 100644 --- a/patches/server/Mob-Pathfinding-API.patch +++ b/patches/server/Mob-Pathfinding-API.patch @@ -54,14 +54,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + @Override + public boolean hasPath() { -+ return entity.getNavigation().getPath() != null; ++ return entity.getNavigation().getPath() != null && !entity.getNavigation().getPath().isDone(); + } + + @Nullable + @Override + public PathResult getCurrentPath() { + Path path = entity.getNavigation().getPath(); -+ return path != null ? new PaperPathResult(path) : null; ++ return path != null && !path.isDone() ? new PaperPathResult(path) : null; + } + + @Nullable