Skip to content

Commit

Permalink
Fix npe (#10157)
Browse files Browse the repository at this point in the history
Fix NPE in forester tool when no existing zone is set
  • Loading branch information
uecasm authored Aug 24, 2024
1 parent b9c155b commit b08e7cd
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,8 @@ public List<OverlayBox> getOverlayBoxes(@NotNull final Level world, @NotNull fin
{
final OverlayBox anchorBox = new OverlayBox(box.anchor(), RED_OVERLAY, 0.02f, true);

if (box.corners() != null)
if (box.corners() != null && box.corners().getA() != null && box.corners().getB() != null)
{
assert box.corners().getA() != null && box.corners().getB() != null;
final AABB bounds = AABB.encapsulatingFullBlocks(box.corners().getA(), box.corners().getB().offset(1, 1, 1)).inflate(1);
// inflate(1) is due to implementation of BlockPosUtil.isInArea

Expand Down

0 comments on commit b08e7cd

Please sign in to comment.