DubstepDentist

Test Plant

Mar 28th, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. currentSlot = 1
  2. turtle.select(currentSlot)
  3. function Planting(rows, rowLength)
  4. for i = 1,rows do
  5. for x = 1,(rowLength-1) do
  6. Plant()
  7. turtle.forward()
  8. end
  9. Plant()
  10. if (i == rows) then
  11. break;
  12. end
  13. if (i % 2 == 0) then
  14. turtle.turnLeft()
  15. turtle.forward()
  16. turtle.turnLeft()
  17. else
  18. turtle.turnRight()
  19. turtle.forward()
  20. turtle.turnRight()
  21. end
  22. end
  23. if (rows % 2 == 0) then
  24. turtle.turnRight()
  25. for i = 1,(rowLength-1) do
  26. turtle.forward()
  27. end
  28. else
  29. turtle.turnLeft()
  30. for i = 1,(rowLength-1) do
  31. turtle.forward()
  32. end
  33. turtle.turnLeft()
  34. for i = 1,(rowLength-1) do
  35. turtle.forward()
  36. end
  37. turtle.turnLeft()
  38. turtle.turnLeft()
  39. end
  40. end
  41. function Plant()
  42. items = turtle.getItemCount(currentSlot)
  43. if items == 0 then
  44. currentSlot = currentSlot+1
  45. turtle.select(currentSlot)
  46. end
  47. turtle.placeDown()
  48. end
  49. Planting(9, 9)
Advertisement
Add Comment
Please, Sign In to add comment