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 1efbbb3ef9
commit 52a9b1c91e

View file

@ -41,6 +41,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
while(blockPos.getY() < this.level.getMaxBuildHeight() && levelChunk.getBlockState(blockPos).isAir()) {
@@ -0,0 +0,0 @@ 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()) {
}