Advertisement
ecco7777

farming turtle

Jun 30th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. delay=0
  2. function plant()
  3.     if seedExists then
  4.         if seed.metadata==7 then
  5.         turtle.digDown()
  6.         turtle.placeDown()
  7.         end
  8.     else
  9.         turtle.placeDown()
  10.     end
  11. end
  12.  
  13. while true do
  14.     seedExists,seed=turtle.inspectDown()
  15.     plant()
  16.    
  17.     if turtle.detect() then
  18.         turtle.turnRight()
  19.         turtle.turnRight()
  20.         while turtle.detect()==false do
  21.             turtle.forward()
  22.         end
  23.         turtle.turnRight()
  24.             if turtle.detect() then
  25.                 turtle.turnRight()
  26.                 turtle.turnRight()
  27.                     while turtle.detect()==false do
  28.                         turtle.forward()
  29.                     end
  30.                 turtle.turnRight()
  31.                 turtle.turnRight()
  32.             end
  33.         turtle.forward()
  34.         plant()
  35.         turtle.turnRight()     
  36.     end
  37.     turtle.forward()
  38.     sleep(delay)
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement