Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- currentSlot = 1
- turtle.select(currentSlot)
- function Planting(rows, rowLength)
- for i = 1,rows do
- for x = 1,(rowLength-1) do
- Plant()
- turtle.forward()
- end
- Plant()
- if (i == rows) then
- break;
- end
- if (i % 2 == 0) then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- else
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- end
- if (rows % 2 == 0) then
- turtle.turnRight()
- for i = 1,(rowLength-1) do
- turtle.forward()
- end
- else
- turtle.turnLeft()
- for i = 1,(rowLength-1) do
- turtle.forward()
- end
- turtle.turnLeft()
- for i = 1,(rowLength-1) do
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- end
- end
- function Plant()
- items = turtle.getItemCount(currentSlot)
- if items == 0 then
- currentSlot = currentSlot+1
- turtle.select(currentSlot)
- end
- turtle.placeDown()
- end
- Planting(9, 9)
Advertisement
Add Comment
Please, Sign In to add comment