summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hole.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/hole.lua b/hole.lua
index cbbb0b2..461cebf 100644
--- a/hole.lua
+++ b/hole.lua
@@ -12,7 +12,7 @@ while true do
local scanned = scanner.scan()
local targets = {}
for _,s in ipairs(scanned) do
- if s.name ~= "minecraft:air" then
+ if s.name ~= "minecraft:air" and v.y < 0 then
local should_add = true
for i,t in ipairs(targets) do
@@ -31,7 +31,7 @@ while true do
for _,v in ipairs(targets) do
if v.z <= 7 and v.z >= -8
and v.x <= 7 and v.x >= -8
- and v.y < 0 then
+ then
local yaw,pitch = yaw_pitch(v.x,v.y,v.z)
laser.fire(yaw,pitch,4)
end