fix worldGenQueue skipping certain generation requests

This commit is contained in:
James Seibel
2023-05-03 07:47:59 -05:00
parent 03a36a80ff
commit 2a8e4cec23
@@ -244,11 +244,11 @@ public class WorldGenerationQueue implements Closeable
WorldGenTask closestTask = null;
// TODO improve, having to go over every item isn't super efficient
Iterator<QuadNode<WorldGenTask>> leafNodeIterator = this.waitingTaskQuadTree.leafNodeIterator();
while (leafNodeIterator.hasNext())
// TODO improve, having to go over every node isn't super efficient, removing null nodes from the tree would help
Iterator<QuadNode<WorldGenTask>> nodeIterator = this.waitingTaskQuadTree.nodeIterator();
while (nodeIterator.hasNext())
{
WorldGenTask newGenTask = leafNodeIterator.next().value;
WorldGenTask newGenTask = nodeIterator.next().value;
if (newGenTask != null) // TODO add an option to skip leaves with null values and potentially auto-prune them
{