Don't update playerNear on an empty path

This commit is contained in:
Brady
2023-06-21 21:19:12 -05:00
parent 0aff31b768
commit 4776fa1876

View File

@@ -282,6 +282,10 @@ public final class ElytraBehavior extends Behavior implements IElytraBehavior, H
}
public void updatePlayerNear() {
if (this.path.isEmpty()) {
return;
}
int index = this.playerNear;
final BetterBlockPos pos = ctx.playerFeet();
for (int i = index; i >= Math.max(index - 1000, 0); i -= 10) {