Fettish

Turtle Farm Bot

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