summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2023-01-02 23:45:52 +0000
committerubq323 <ubq323@ubq323.website>2023-01-02 23:45:52 +0000
commit9d95dfcdc917ba51cd9a1ba6f533c5edb79a8101 (patch)
treeb3066ec83ea08876fcedddbbce7b99a49a64be44
parent8bbde6c44b408624c905c6d482f9871b2f8f9f7a (diff)
fish
-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