aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0249-Mob-Pathfinding-API.patch
diff options
context:
space:
mode:
authorSoSeDiK <[email protected]>2024-05-01 13:00:11 +0300
committerGitHub <[email protected]>2024-05-01 12:00:11 +0200
commit4cfd9e25fad4ab9a40452acb090467249c19d105 (patch)
treedb41a3ef161169689f451b4ad1a1beb3adf4690e /patches/server/0249-Mob-Pathfinding-API.patch
parent3e0eb4a1baa5df5847f69982c78814bf9757cb97 (diff)
downloadPaper-4cfd9e25fad4ab9a40452acb090467249c19d105.tar.gz
Paper-4cfd9e25fad4ab9a40452acb090467249c19d105.zip
Expose canReach to mob pathfinding API (#10636)
Diffstat (limited to 'patches/server/0249-Mob-Pathfinding-API.patch')
-rw-r--r--patches/server/0249-Mob-Pathfinding-API.patch9
1 files changed, 7 insertions, 2 deletions
diff --git a/patches/server/0249-Mob-Pathfinding-API.patch b/patches/server/0249-Mob-Pathfinding-API.patch
index 2adce44ac3..7cf9f7d7fa 100644
--- a/patches/server/0249-Mob-Pathfinding-API.patch
+++ b/patches/server/0249-Mob-Pathfinding-API.patch
@@ -12,10 +12,10 @@ public net.minecraft.world.level.pathfinder.Path nodes
diff --git a/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java b/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java
new file mode 100644
-index 0000000000000000000000000000000000000000..064712e7b27a200b29c72076a82f4f5611fa507f
+index 0000000000000000000000000000000000000000..3dbe4cf29a7984a1976a60bdeeb3ede02316a3cb
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java
-@@ -0,0 +1,143 @@
+@@ -0,0 +1,148 @@
+package com.destroystokyo.paper.entity;
+
+import org.apache.commons.lang.Validate;
@@ -132,6 +132,11 @@ index 0000000000000000000000000000000000000000..064712e7b27a200b29c72076a82f4f56
+ }
+
+ @Override
++ public boolean canReachFinalPoint() {
++ return path.canReach();
++ }
++
++ @Override
+ public List<Location> getPoints() {
+ List<Location> points = new ArrayList<>();
+ for (Node point : path.nodes) {