Restore blocks until correct block has been restored and verified

This commit is contained in:
zontreck 2024-04-25 03:39:29 -07:00
parent 0dcf38ce2a
commit c19e971e92
2 changed files with 15 additions and 12 deletions

View file

@ -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.0321
mod_version=1201.13.042524.0327
# 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

View file

@ -147,6 +147,9 @@ public abstract class BlockRestoreQueue
PrimitiveBlock block = PrimitiveBlock.deserialize(NbtIo.read(dis));
if(block.level.getBlockState(block.position).is(block.blockType))
{
try {
res.deleteRow();
if (!res.rowDeleted()) {
@ -160,7 +163,7 @@ public abstract class BlockRestoreQueue
pstat.setInt(4, block.position.getZ());
DatabaseWrapper.get().executePreparedStatement(pstat);
}
}
return block;
} else return null;