From 52a9b1c91ee8d36a21dec809361def2fa25d03c9 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 22 Sep 2023 15:38:31 -0700 Subject: [PATCH] Fix recursion with pathfind entity event With the function overload, need to pass the entity through to the super call --- patches/server/EntityPathfindEvent.patch | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/patches/server/EntityPathfindEvent.patch b/patches/server/EntityPathfindEvent.patch index 194d464502..46ec66ae31 100644 --- a/patches/server/EntityPathfindEvent.patch +++ b/patches/server/EntityPathfindEvent.patch @@ -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()) { }