summaryrefslogtreecommitdiff
path: root/fish.lua
blob: 576a791403dfcf42bcc555be533f56885a936f59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
os.sleep(3)

local p=peripheral.wrap"back"
while true do
p.use()
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("not found") end
	--print(ent.y)
	if ent.y<=-2.0 then p.use() break end

	os.sleep()
end

os.sleep(0.5)
end