Skip to content

Commit

Permalink
Fixed NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonhardaway committed Apr 6, 2021
1 parent 2d8ca8c commit b80ee50
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public boolean shouldExecute() {
double distance = this.slabfish.getDistanceSq(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5);
double closest = this.effigyPos == null ? Double.MAX_VALUE : this.slabfish.getDistanceSq(this.effigyPos.getX() + 0.5, this.effigyPos.getY(), this.effigyPos.getZ() + 0.5);
if (distance < closest) {
if (this.slabfish.getNavigator().getPathToPos(this.effigyPos, 0) == null)
if (this.slabfish.getNavigator().getPathToPos(pos, 0) == null)
return;

this.effigyPos = pos.toImmutable();
Expand Down

0 comments on commit b80ee50

Please sign in to comment.