Advertisement
Shnuffler

mc turtle farm portion-7

Mar 24th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1.  
  2. function bankRight()
  3. turtle.turnRight()
  4. turtle.forward()
  5. turtle.turnRight()
  6. end
  7.  
  8. function bankLeft()
  9. turtle.turnLeft()
  10. turtle.forward()
  11. turtle.turnLeft()
  12. end
  13.  
  14. function plant()
  15. turtle.digDown()
  16. turtle.select(9)
  17. turtle.placeDown(1)
  18. end
  19.  
  20. local numberInSlot
  21. function allButOne(slotNum)
  22. turtle.select(slotNum)
  23. numberInSlot = turtle.getItemCount(slotNum)
  24. turtle.dropDown(numberInSlot - 1)
  25. end
  26.  
  27. local slotsDone
  28. function pootis()
  29. print("Putting wheat away")
  30. for slotsDone = 1, 8 do
  31. allButOne(slotsDone)
  32. sleep(1)
  33. end
  34. turtle.turnRight()
  35. turtle.up()
  36. turtle.up()
  37. turtle.forward()
  38. turtle.forward()
  39. print("Putting seeds away... lol")
  40. for slotsDone = 9, 16 do
  41. allButOne(slotsDone)
  42. sleep(1)
  43. end
  44. turtle.back()
  45. turtle.back()
  46. turtle.down()
  47. turtle.down()
  48. turtle.turnLeft()
  49. end
  50.  
  51. function stackSeeds()
  52. for seedSlot = 9, 16 do
  53. turtle.select(seedSlot)
  54. turtle.transferTo(16)
  55. sleep(1)
  56. end
  57. end
  58.  
  59. function stackWheat()
  60. for wheatSlot = 1, 8 do
  61. turtle.select(wheatSlot)
  62. turtle.transferTo(8)
  63. sleep(1)
  64. end
  65. end
  66.  
  67. function unStackSeeds()
  68. for seedSlot = 9, 16 do
  69. turtle.select(16)
  70. turtle.transferTo(seedSlot, 1)
  71. sleep(1)
  72. end
  73. end
  74.  
  75. function unStackWheat()
  76. for wheatSlot = 1, 8 do
  77. turtle.select(8)
  78. turtle.transferTo(wheatSlot, 1)
  79. sleep(1)
  80. end
  81. end
  82.  
  83. function jobDone()
  84. turtle.forward()
  85. turtle.turnLeft()
  86. turtle.back()
  87. turtle.back()
  88. turtle.back()
  89. turtle.back()
  90. turtle.back()
  91. turtle.back()
  92. pootis()
  93. turtle.back()
  94. turtle.turnRight()
  95. turtle.back()
  96. turtle.turnLeft()
  97.  
  98. print("Cleaning up inventory")
  99. stackSeeds()
  100. stackWheat()
  101.  
  102. turtle.select(1)
  103.  
  104. end
  105.  
  106.  
  107. print("Farmin'")
  108.  
  109. unStackSeeds()
  110. unStackWheat()
  111.  
  112. turtle.turnRight()
  113. turtle.forward()
  114. turtle.turnLeft()
  115. turtle.forward()
  116. turtle.forward()
  117. turtle.turnLeft()
  118.  
  119.  
  120. for row = 1, 8 do
  121. plant()
  122. turtle.forward()
  123. end
  124. plant()
  125.  
  126. bankRight()
  127. for row = 1, 8 do
  128. plant()
  129. turtle.forward()
  130. end
  131. plant()
  132.  
  133. bankLeft()
  134. for row = 1, 8 do
  135. plant()
  136. turtle.forward()
  137. end
  138. plant()
  139.  
  140. bankRight()
  141. for row = 1, 8 do
  142. plant()
  143. turtle.forward()
  144. end
  145. plant()
  146.  
  147. bankLeft()
  148. for row = 1, 8 do
  149. plant()
  150. turtle.forward()
  151. end
  152. plant()
  153.  
  154. bankRight()
  155. for row = 1, 8 do
  156. plant()
  157. turtle.forward()
  158. end
  159. plant()
  160.  
  161. jobDone()
  162.  
  163. print("Done farming.")
  164. sleep(4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement