fix world gen not canceling for far away pos

This commit is contained in:
James Seibel
2026-04-19 21:10:20 -05:00
parent 5d391c83ea
commit 7e40546bc5
@@ -245,14 +245,19 @@ public class LodQuadTree extends QuadTree<LodRenderSection> implements IDebugRen
//===================//
//region
// remove out of bounds sections
this.setCenterBlockPos(playerPos, (renderSection) ->
{
// removing out of bounds sections
if (renderSection != null)
{
this.fullDataSourceProvider.removeRetrievalRequestIf((long genPos) -> DhSectionPos.contains(renderSection.pos, genPos));
this.missingGenerationPosSet.remove(renderSection.pos);
this.queuedGenerationPosSet.remove(renderSection.pos);
// unfortunately we have to fully go through each set
// since a removed position may be larger than the multiple generated positions
// it contains
this.missingGenerationPosSet.removeIf((Long genPos) -> DhSectionPos.contains(renderSection.pos, genPos));
this.queuedGenerationPosSet.removeIf((Long genPos) -> DhSectionPos.contains(renderSection.pos, genPos));
renderSection.close();
}
});