diff --git a/patches/api/Mob-Pathfinding-API.patch b/patches/api/Mob-Pathfinding-API.patch index 879218e116..09d62a197d 100644 --- a/patches/api/Mob-Pathfinding-API.patch +++ b/patches/api/Mob-Pathfinding-API.patch @@ -227,6 +227,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @return The closest point the path can get to the target location + */ + @Nullable Location getFinalPoint(); ++ ++ /** ++ * Checks whether the final point can be reached ++ * ++ * @return whether the final point can be reached ++ * @see #getFinalPoint() ++ */ ++ boolean canReachFinalPoint(); + } +} diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java diff --git a/patches/server/Mob-Pathfinding-API.patch b/patches/server/Mob-Pathfinding-API.patch index 5fd9fe8968..a63143736f 100644 --- a/patches/server/Mob-Pathfinding-API.patch +++ b/patches/server/Mob-Pathfinding-API.patch @@ -132,6 +132,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + + @Override ++ public boolean canReachFinalPoint() { ++ return path.canReach(); ++ } ++ ++ @Override + public List getPoints() { + List points = new ArrayList<>(); + for (Node point : path.nodes) {