Fix recursion with pathfind entity event

With the function overload, need to pass the entity
through to the super call
This commit is contained in:
Spottedleaf 2023-09-22 15:38:31 -07:00
parent ea01aa335a
commit d259503c92

View File

@ -19,7 +19,7 @@ index 3db41017c6690d4519564496edd8e7365b2f5a22..027eef4ace908147285c8d72b612d16e
@Override
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
index 12564909abff7da4e5a4bb3d004a7ede2ffda12d..c0550a87dbc79090ccac8568186f22a49bb3837f 100644
index 12564909abff7da4e5a4bb3d004a7ede2ffda12d..ac996b066415e461af1fcb71b19807401179c7f8 100644
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
@@ -41,7 +41,7 @@ public class GroundPathNavigation extends PathNavigation {
@ -40,7 +40,14 @@ index 12564909abff7da4e5a4bb3d004a7ede2ffda12d..c0550a87dbc79090ccac8568186f22a4
}
while(blockPos.getY() < this.level.getMaxBuildHeight() && levelChunk.getBlockState(blockPos).isAir()) {
@@ -69,14 +69,14 @@ public class GroundPathNavigation extends PathNavigation {
@@ -63,20 +63,20 @@ public class GroundPathNavigation extends PathNavigation {
}
if (!levelChunk.getBlockState(target).isSolid()) {
- return super.createPath(target, distance);
+ return super.createPath(target, entity, distance); // Paper
} else {
BlockPos blockPos2;
for(blockPos2 = target.above(); blockPos2.getY() < this.level.getMaxBuildHeight() && levelChunk.getBlockState(blockPos2).isSolid(); blockPos2 = blockPos2.above()) {
}