Advertisement
rungholt

pamcotton

Aug 27th, 2021 (edited)
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. local function goBack()
  2.     for i = 1, 13 do
  3.         turtle.back(i)
  4.     end
  5. end
  6.  
  7. local function findSlot()
  8.     for i = 1,15 do
  9.         if turtle.getItemSpace(i) > 0 then
  10.             turtle.select(i)
  11.             return
  12.         end
  13.     end
  14. end
  15.  
  16. while true do
  17.     local isBlock, data = turtle.inspectDown()
  18.     if isBlock then
  19.         if data.state and data.state.age == 3 then
  20.             turtle.digDown()
  21.             turtle.select(1)
  22.             turtle.placeDown()
  23.         end
  24.         if data.state and data.state.age < 3 then
  25.             turtle.forward()
  26.         end
  27.     else
  28.         goBack()
  29.         findSlot()
  30.         turtle.back()
  31.         turtle.down()
  32.         turtle.select(1)
  33.         turtle.dropDown()
  34.         turtle.up()
  35.         turtle.forward()
  36.         sleep(300)
  37.     end
  38. end
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement