Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- doLeft = true
- function harvest(length, width)
- for i=1,width,1 do
- harvestLength(length)
- if width ~= i then
- if doLeft then
- left()
- else
- right()
- end
- end
- doLeft = not doLeft
- end
- if doLeft then
- turtle.turnLeft()
- for i=2,width,1 do
- turtle.forward()
- end
- turtle.turnLeft()
- else
- for i=1,length,1 do
- turtle.back()
- end
- turtle.turnRight()
- for i=1,width,1 do
- turtle.forward()
- end
- turtle.turnLeft()
- end
- end
- function harvestLength(length)
- thing = length - 1
- for i=1, thing,1 do
- turtle.digDown()
- replant()
- turtle.forward()
- end
- turtle.digDown()
- replant()
- end
- function replant()
- turtle.select(1)
- turtle.placeDown()
- end
- function left()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- function right()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- harvest(8,4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement