Added option to scan blocks underwater without scanning the water blocks

This commit is contained in:
Brianna 2020-04-05 09:18:55 -04:00
parent 133d34683a
commit b6b0df47eb
2 changed files with 5 additions and 3 deletions

View File

@ -93,7 +93,7 @@ public final class BlockScanner extends BukkitRunnable {
final ConfigurationSection liquidSection = config.getConfigurationSection("Island.World." + env + ".Liquid");
for (List<ChunkSnapshot> sub : parts) {
queueWork(world, liquidSection.getBoolean("Enable") ? liquidSection.getInt("Height") + 1 : 0, sub);
queueWork(world, liquidSection.getBoolean("Enable") && !config.getBoolean("Island.Levelling.ScanLiquid") ? liquidSection.getInt("Height") + 1 : 0, sub);
}
}
@ -114,9 +114,9 @@ public final class BlockScanner extends BukkitRunnable {
for (int z = 0; z < 16; z++) {
for (int y = scanY; y < 256; y++) {
final Material type = VERSION > 12 ? shot.getBlockType(x, y, z) : MaterialIDHelper.getLegacyMaterial(getBlockTypeID(shot, x, y, z));
final CompatibleMaterial type = CompatibleMaterial.getMaterial(shot.getBlockType(x, y, z));
if (type == Material.AIR) continue;
if (type == CompatibleMaterial.AIR || type == CompatibleMaterial.WATER) continue;
blocks.add(new BlockInfo(world, x + (cX), y, z + (cZ)));
}

View File

@ -178,6 +178,8 @@ Island:
# time cycle or be fixed.
Cycle: false
Levelling:
# Should the level scanner scan water?
ScanLiquid: false
# Run a scan automatically when pasting an island structure
ScanAutomatically: true
# Include Points: 0 in the '/is level' GUI