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
|
@ -53,7 +53,7 @@ mod_name=Zontreck's Library Mod
|
|||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||
mod_license=GPLv3
|
||||
# The mod version. See https://semver.org/
|
||||
mod_version=1201.13.042524.0230
|
||||
mod_version=1201.13.042524.0321
|
||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||
# This should match the base package used for the mod sources.
|
||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
|
|
|
@ -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