summaryrefslogtreecommitdiff
path: root/fish.lua
diff options
context:
space:
mode:
Diffstat (limited to 'fish.lua')
-rw-r--r--fish.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/fish.lua b/fish.lua
new file mode 100644
index 0000000..8058d41
--- /dev/null
+++ b/fish.lua
@@ -0,0 +1,24 @@
+os.sleep(3)
+
+local p=peripheral.wrap"back"
+while true do
+p.use()
+os.sleep(5)
+while true do
+ local es=p.sense()
+ local ent=nil
+ for i,e in ipairs(es) do
+ if e.key == "minecraft:fishing_bobber" then
+ ent=e
+ break
+ end
+ end
+ if not ent then error("notfound") end
+ --print(ent.y)
+ if ent.y<=-3.7 then p.use() break end
+
+ os.sleep()
+end
+
+os.sleep(1)
+end