Advertisement
nikich800

farmer_2

May 18th, 2021 (edited)
781
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. seeds, harvests, fuel = 1, 2, 16
  2.  
  3. function harvest()
  4.     success, data = turtle.inspectDown()
  5.     if(success)
  6.     then
  7.         if(data.state.age == 7)
  8.         then
  9.             turtle.digDown()
  10.             turtle.suckDown()
  11.             turtle.placeDown()
  12.         end
  13.     end
  14.  
  15.     if(not turtle.inspectDown())
  16.     then
  17.         seeds, harvests = harvests, seeds
  18.         turtle.select(seeds)
  19.         turtle.placeDown()
  20.     end
  21.    
  22. end
  23.  
  24. turtle.forward();
  25.  
  26. for i = 1, 9, 1
  27. do
  28.     for j = 1, 2, 1
  29.     do
  30.         for k = 1, 9 - i, 1
  31.         do
  32.             harvest()
  33.             turtle.forward()
  34.             turtle.suckDown()
  35.         end
  36.         turtle.turnRight()
  37.     end
  38. end
  39.  
  40. turtle.forward()
  41. turtle.forward()
  42. turtle.forward()
  43. turtle.forward()
  44.  
  45. turtle.turnRight()
  46.  
  47. turtle.forward()
  48. turtle.forward()
  49. turtle.forward()
  50. turtle.forward()
  51.  
  52. turtle.turnRight()
  53.  
  54. turtle.back()
  55.  
  56.  
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement