Skip to content

Commit

Permalink
Null check bounding boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Mar 12, 2022
1 parent 4397aa4 commit 4a61239
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -35,6 +35,8 @@ public PassableState isPassable(BlockSource source, PathPoint point) {
if (!MinecraftBlockExaminer.canStandIn(up) && MinecraftBlockExaminer.canStandOn(down)) {
BoundingBox above = source.getCollisionBox(pos.getBlockX(), pos.getBlockY() + 2, pos.getBlockZ());
BoundingBox below = source.getCollisionBox(pos.getBlockX(), pos.getBlockY() - 1, pos.getBlockZ());
if (above == null || below == null)
return PassableState.IGNORE;
float height = (float) (above.minY - below.maxY);
if (height < this.height) {
return PassableState.UNPASSABLE;
Expand Down

0 comments on commit 4a61239

Please sign in to comment.