Fix the block queue not setting the hasBlocks flag to false
This commit is contained in:
parent
4bf127bc14
commit
0dcf38ce2a
3 changed files with 13 additions and 2 deletions
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Reference in a new issue