diff options
author | ubq323 <ubq323@ubq323.website> | 2022-06-27 23:59:05 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-06-27 23:59:05 +0100 |
commit | 2be0f5104695e7f02644603973135f868079dc52 (patch) | |
tree | 7074b87726735e74a74ca85d2e1e8e896f4b56ec | |
parent | 3f6068ab48f00b6176b73315ebbe08027dc6f1f2 (diff) |
hole
-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 |