mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
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:
parent
1efbbb3ef9
commit
52a9b1c91e
1 changed files with 7 additions and 0 deletions
|
@ -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()) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue