summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-06-28 00:01:06 +0100
committerubq323 <ubq323@ubq323.website>2022-06-28 00:01:06 +0100
commit27c4e961c8dd4e15d31f52fff87637678cdf5bff (patch)
tree1647d908c1c1c1f618360c76f81b114b2a4ac8f1
parent2be0f5104695e7f02644603973135f868079dc52 (diff)
hole
-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