Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local count = 1
- local line = 1
- turtle.select(1)
- local function reset()
- turtle.turnLeft()
- for i = 1, 8 do turtle.forward() end
- turtle.turnLeft()
- for i = 1, 8 do turtle.forward() end
- for i = 16, 2, -1 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- count = 1
- line = 1
- end
- local function Handle()
- local s, d = turtle.inspectDown()
- if (d.metadata == 7) then
- turtle.digDown()
- turtle.suckDown()
- end
- if (turtle.getItemCount() > 0) then
- turtle.placeDown()
- end
- end
- local function TurnRFR()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- local function TurnLFL()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- local function Info()
- term.clear()
- term.setCursorPos(1, 1)
- print("Farming. Blocks processed: ", count, ". Line: ", line, ".")
- end
- while true do
- Info()
- if (count == 81) then reset() print("Complete!") break end
- if (count % 9 ~= 0) then
- Handle()
- turtle.forward()
- count = count + 1
- else
- Handle()
- if (line % 2 ~= 0) then TurnRFR()
- else TurnLFL() end
- count = count + 1
- line = line + 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement