diff options
-rw-r--r-- | hole.lua | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -12,17 +12,20 @@ while true do local scanned = scanner.scan() local targets = {} for _,s in ipairs(scanned) do - local should_add = true - for i,t in ipairs(targets) do - if t.x == s.x and t.z == s.z then - should_add = false - if s.y > t.y then - targets[i] = s + if s.name ~= "minecraft:air" then + local should_add = true + + for i,t in ipairs(targets) do + if t.x == s.x and t.z == s.z then + should_add = false + if s.y > t.y then + targets[i] = s + end end end - end - if should_add then - table.insert(targets,s) + if should_add then + table.insert(targets,s) + end end end for _,v in ipairs(targets) do |