Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function harvest()
- turtle.dig()
- turtle.forward()
- while turtle.detectUp() do
- turtle.digUp()
- turtle.up()
- end
- while not turtle.detectDown() do
- turtle.down()
- end
- turtle.back()
- turtle.place()
- turtle.select(2)
- turtle.place()
- turtle.place()
- turtle.place()
- turtle.place()
- turtle.place()
- turtle.place()
- turtle.place()
- turtle.place()
- turtle.place()
- turtle.place()
- turtle.select(1)
- end
- local args = {...}
- if args[1] ~= 0 then
- for i = 1, args[1] do
- harvest()
- end
- else
- while turtle.getItemCount(1) > 0 and turtle.getFuelLevel() >= 2 do
- harvest()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement