partially fix WorldGenQueue's index out of bounds issue

This commit is contained in:
James Seibel
2023-05-03 07:48:21 -05:00
parent 2a8e4cec23
commit 05ca9bca15
@@ -316,6 +316,13 @@ public class WorldGenerationQueue implements Closeable
DhSectionPos sectionPos = new DhSectionPos(closestTask.pos.detailLevel, closestTask.pos.x, closestTask.pos.z);
sectionPos.forEachChild((childDhSectionPos) ->
{
if (!this.waitingTaskQuadTree.isSectionPosInBounds(childDhSectionPos))
{
// don't attempt to generate terrain outside the user's render distance
return;
}
CompletableFuture<WorldGenResult> newFuture = new CompletableFuture<>();
childFutures.add(newFuture);