From 27c4e961c8dd4e15d31f52fff87637678cdf5bff Mon Sep 17 00:00:00 2001 From: ubq323 Date: Tue, 28 Jun 2022 00:01:06 +0100 Subject: hole --- hole.lua | 4 ++-- 1 file 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 -- cgit v1.2.3