Skip to content

Commit

Permalink
add check for world bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
TelepathicGrunt committed Sep 24, 2022
1 parent 9b4bb40 commit 3bee4d4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ public Optional<Structure.StructurePosition> getStructurePosition(Structure.Cont
false,
this.projectStartToHeightmap,
this.maxDistanceFromCenter);

BlockPos pos = structurePiecesGenerator.get().position();
if (pos.getY() <= 16) {
return Optional.empty();
}
return structurePiecesGenerator;
}

Expand Down

0 comments on commit 3bee4d4

Please sign in to comment.