summaryrefslogtreecommitdiff
path: root/fish.lua
blob: 624089402cc579bcc82055552cc0cdaa067a6c6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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.0 then p.use() break end

	os.sleep()
end

os.sleep(1)
end