JaMaNi133

EnderLilyFarm

Jul 10th, 2021 (edited)
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. local len = 16
  2. while true do
  3.  
  4.     while turtle.getFuelLevel() < (2 * len) + 80 do
  5.         print("refueling...")
  6.         turtle.select(16)
  7.         turtle.suckUp(1)
  8.         turtle.refuel()
  9.        
  10.     end
  11.  
  12.     while redstone.getInput("bottom") == false do
  13.         print("waiting for redstone input")
  14.         os.sleep(1)
  15.     end
  16.     local index = len
  17.     while index > 0 do
  18.         local success, data = turtle.inspectDown()
  19.         if success then
  20.             print("Block metadata: ", data.metadata)
  21.             if data.metadata == 7 then
  22.                 turtle.digDown()
  23.                 turtle.select(1)
  24.                 turtle.placeDown()
  25.             end
  26.         end
  27.         turtle.forward()
  28.         index = index - 1
  29.     end
  30.     turtle.turnLeft()
  31.     turtle.turnLeft()
  32.     index = len
  33.     while index > 0 do
  34.         turtle.forward()
  35.         index = index - 1
  36.     end
  37.     turtle.turnLeft()
  38.     turtle.turnLeft()
  39. end
Add Comment
Please, Sign In to add comment