Fix the block queue not setting the hasBlocks flag to false

This commit is contained in:
zontreck 2024-04-25 03:21:32 -07:00
parent 4bf127bc14
commit 0dcf38ce2a
3 changed files with 13 additions and 2 deletions

View file

@ -177,6 +177,14 @@ public abstract class BlockRestoreQueue
return blk;
}
/**
* Sets the hasBlocks flag to false to reduce DB Spam
*/
public void setNoBlocks()
{
hasBlocks=false;
}
/**
* Override to indicate if the list should be sorted by lowest Y value
*

View file

@ -29,7 +29,10 @@ public class BlockRestoreRunner implements Runnable
return;
PrimitiveBlock prim = queue.getNextBlock();
if(prim == null)return; // No more blocks.
if(prim == null){
queue.setNoBlocks();
return; // No more blocks.
}
Level level = prim.level;