diff --git a/src/main/java/com/songoda/skyblock/blockscanner/BlockScanner.java b/src/main/java/com/songoda/skyblock/blockscanner/BlockScanner.java index 0dac9ab7..09605c30 100644 --- a/src/main/java/com/songoda/skyblock/blockscanner/BlockScanner.java +++ b/src/main/java/com/songoda/skyblock/blockscanner/BlockScanner.java @@ -114,9 +114,12 @@ public final class BlockScanner extends BukkitRunnable { for (int z = 0; z < 16; z++) { for (int y = scanY; y < 256; y++) { - final CompatibleMaterial type = CompatibleMaterial.getMaterial(shot.getBlockType(x, y, z)); - if (type == CompatibleMaterial.AIR || type == CompatibleMaterial.WATER) continue; + final CompatibleMaterial type = CompatibleMaterial.getBlockMaterial(VERSION > 12 + ? shot.getBlockType(x, y, z) : MaterialIDHelper.getLegacyMaterial(getBlockTypeID(shot, x, y, z))); + + + if (type == null || type == CompatibleMaterial.AIR || type == CompatibleMaterial.WATER) continue; blocks.add(new BlockInfo(world, x + (cX), y, z + (cZ))); }