diff --git a/gradle.properties b/gradle.properties index 9f4a898..f216427 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/src/main/java/dev/zontreck/libzontreck/memory/world/BlockRestoreQueue.java b/src/main/java/dev/zontreck/libzontreck/memory/world/BlockRestoreQueue.java index ffe91a9..9c8c2ab 100644 --- a/src/main/java/dev/zontreck/libzontreck/memory/world/BlockRestoreQueue.java +++ b/src/main/java/dev/zontreck/libzontreck/memory/world/BlockRestoreQueue.java @@ -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 * diff --git a/src/main/java/dev/zontreck/libzontreck/memory/world/BlockRestoreRunner.java b/src/main/java/dev/zontreck/libzontreck/memory/world/BlockRestoreRunner.java index 05ade1c..3750189 100644 --- a/src/main/java/dev/zontreck/libzontreck/memory/world/BlockRestoreRunner.java +++ b/src/main/java/dev/zontreck/libzontreck/memory/world/BlockRestoreRunner.java @@ -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;