Advertisement
Fettish

Turtle Farm Bot

Jul 23rd, 2024 (edited)
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.03 KB | None | 0 0
  1.  
  2. function check()
  3.     local has_block, data = turtle.inspect()
  4.     if has_block then
  5.         if(data.state.age == 7) then
  6.             turtle.dig()
  7.             turtle.turnLeft()
  8.             turtle.forward()
  9.             turtle.turnRight()
  10.         else
  11.             turtle.turnLeft()
  12.             turtle.forward()
  13.             turtle.turnRight()
  14.         end
  15.     end
  16. end
  17.  
  18. function farm()
  19.     local crops = 30
  20.     for i = 1, crops, 1 do
  21.         check()
  22.     end
  23.  
  24.     for i = 1, crops, 1 do
  25.         turtle.select(1)
  26.         turtle.place()
  27.         turtle.turnRight()
  28.         turtle.forward()
  29.         turtle.turnLeft()
  30.     end
  31.  
  32.     local inventory = 15
  33.     local x = 1
  34.     for i = 1, inventory, 1 do
  35.         turtle.dropDown()
  36.         turtle.select(x)
  37.         x = x + 1
  38.     end
  39.     turtle.select(1)
  40. end
  41. while(true) do
  42.     local has_block, data = turtle.inspect()
  43.         if has_block then
  44.             if(data.state.age == 7) then
  45.                 farm()
  46.             end
  47.         end
  48. end
  49.  
  50. -- pastebin get xKQq2HBb farm
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement