fbMarcel

| farm | beetroots

Jan 26th, 2021
784
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. print("######################")
  4. print("##  Farming Turtle  ##")
  5. print("######################")
  6. print("")
  7. print(" farming beetroots...")
  8. function vor(x)
  9.   for i=1,x do
  10.     turtle.forward()
  11.   end
  12. end
  13. function tl()
  14.   turtle.turnLeft()
  15.   turtle.forward()
  16.   turtle.turnLeft()
  17.   turtle.digDown()
  18.   turtle.placeDown()
  19. end
  20. function tr()
  21.   turtle.turnRight()
  22.   turtle.forward()
  23.   turtle.turnRight()
  24.   turtle.digDown()
  25.   turtle.placeDown()
  26. end
  27. function fdp(x)
  28.   for i=1,x do
  29.     turtle.forward()
  30.     turtle.digDown()
  31.     turtle.placeDown()
  32.   end
  33. end
  34. turtle.turnLeft()
  35. vor(29)
  36. turtle.turnLeft()
  37. turtle.forward()
  38. turtle.turnRight()
  39. turtle.up()
  40. turtle.forward()
  41. turtle.digDown()
  42. sleep(0.5)
  43. local slotnr = 1
  44. while true do
  45.   if turtle.getItemDetail(slotnr).name == "minecraft:beetroot_seeds" then
  46.     turtle.select(slotnr)
  47.     break
  48.   else
  49.     slotnr = slotnr + 1
  50.   end
  51.   if slotnr == 16 then
  52.     print("error L1-ln37")
  53.     break
  54.   end
  55. end
  56. turtle.placeDown()
  57. fdp(19)
  58. tl()
  59. fdp(19)
  60. tr()
  61. fdp(19)
  62. tl()
  63. fdp(19)
  64. turtle.forward()
  65. turtle.turnRight()
  66. vor(2)
  67. turtle.turnRight()
  68. fdp(20)
  69. tl()
  70. fdp(19)
  71. tr()
  72. fdp(19)
  73. tl()
  74. fdp(19)
  75. turtle.forward()
  76. turtle.down()
  77. turtle.turnLeft()
  78. vor(9)
  79. turtle.turnRight()
  80. vor(29)
  81. for i=1,16 do
  82.   turtle.select(i)
  83.   turtle.drop()
  84. end
  85. turtle.select(1)
  86. turtle.turnLeft()
  87. print("")
  88. print(" DONE!")
  89. sleep(1)
  90. os.shutdown()
RAW Paste Data