Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local w = 28 --width
- local r = 30 --row
- local i = 1
- x = 0
- print(x)
- repeat
- x = x + 1
- repeat
- local success, data = turtle.inspectDown()
- if success then
- if data.stage.age == 7 then --checking growth of crop (7 = max) use data.metadata if age doesnt work
- turtle.digDown()
- end
- end
- turtle.forward()
- i = i + 1
- until i == w
- if (x % 2 == 0) then
- turtle.turnLeft()
- if success then
- if data.stage.age == 7 then
- turtle.digDown()
- end
- end
- turtle.forward()
- turtle.turnLeft()
- i = 1
- else
- turtle.turnRight()
- if success then
- if data.stage.age == 7 then
- turtle.digDown()
- end
- end
- turtle.forward()
- turtle.turnRight()
- i = 1
- end
- print(x)
- until x == r
- turtle.dropDown()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement