cacacraft

Turtle WheatFarm

Mar 30th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. -- Wheat Farm --
  2.  
  3. local function check_wheat ()
  4. success, inspected = turtle.inspectDown()
  5. if success and inspected["state"]["age"] == 7 then
  6. turtle.select(16);
  7. turtle.digDown()
  8. turtle.placeDown()
  9. end
  10. end
  11.  
  12. print("----- Wheat Farm -----")
  13.  
  14. while true do
  15.  
  16. current_fuel = turtle.getFuelLevel()
  17. print("Fuel level at: ",current_fuel)
  18.  
  19.  
  20. turtle.forward()
  21. check_wheat()
  22. turtle.forward()
  23. check_wheat()
  24. turtle.forward()
  25. check_wheat()
  26. turtle.forward()
  27. check_wheat()
  28. turtle.turnRight()
  29. turtle.forward()
  30. check_wheat()
  31. turtle.forward()
  32. check_wheat()
  33. turtle.forward()
  34. check_wheat()
  35. turtle.forward()
  36. check_wheat()
  37. turtle.forward()
  38. check_wheat()
  39. turtle.turnRight()
  40. turtle.forward()
  41. check_wheat()
  42. turtle.turnRight()
  43. turtle.forward()
  44. check_wheat()
  45. turtle.forward()
  46. check_wheat()
  47. turtle.forward()
  48. check_wheat()
  49. turtle.forward()
  50. check_wheat()
  51. turtle.turnLeft()
  52. turtle.forward()
  53. check_wheat()
  54. turtle.turnLeft()
  55. turtle.forward()
  56. check_wheat()
  57. turtle.forward()
  58. check_wheat()
  59. turtle.forward()
  60. check_wheat()
  61. turtle.forward()
  62. check_wheat()
  63. turtle.turnRight()
  64. turtle.forward()
  65. check_wheat()
  66. turtle.turnRight()
  67. turtle.forward()
  68. check_wheat()
  69. turtle.forward()
  70. check_wheat()
  71. turtle.forward()
  72. check_wheat()
  73. turtle.forward()
  74. check_wheat()
  75. turtle.turnLeft()
  76. turtle.forward()
  77. check_wheat()
  78. turtle.turnLeft()
  79. turtle.forward()
  80. check_wheat()
  81. turtle.forward()
  82. check_wheat()
  83. turtle.forward()
  84. check_wheat()
  85. turtle.forward()
  86. check_wheat()
  87. turtle.turnRight()
  88. turtle.forward()
  89. check_wheat()
  90. turtle.turnRight()
  91. turtle.forward()
  92. check_wheat()
  93. turtle.forward()
  94. check_wheat()
  95. turtle.forward()
  96. check_wheat()
  97. turtle.forward()
  98. check_wheat()
  99. turtle.forward()
  100. check_wheat()
  101. turtle.turnRight()
  102. turtle.forward()
  103. check_wheat()
  104.  
  105. turtle.turnLeft()
  106. for i=1,15 do
  107. turtle.select(i)
  108. turtle.drop()
  109. end
  110. turtle.turnRight()
  111.  
  112. os.sleep(600)
  113. end
Add Comment
Please, Sign In to add comment