PaleoCrafter

Torches

Jan 25th, 2021 (edited)
221
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function selectTorch()
  2.   for i = 9, 16 do
  3.     if turtle.getItemCount(i) > 0 then
  4.       turtle.select(i)
  5.       return
  6.     end
  7.   end
  8.   turtle.select(9)
  9. end
  10.  
  11. function selectCobble()
  12.   for i = 1, 8 do
  13.     if turtle.getItemCount(i) > 0 then
  14.       turtle.select(i)
  15.       return
  16.     end
  17.   end
  18.   turtle.select(1)
  19. end
  20.  
  21. while true do
  22.   while turtle.detectDown() do
  23.     turtle.digDown()
  24.   end
  25.   turtle.down()
  26.   while turtle.detectDown() do
  27.     turtle.digDown()
  28.   end
  29.   selectCobble()
  30.   turtle.placeDown()
  31.   turtle.up()
  32.   selectTorch()
  33.   turtle.placeDown()
  34.  
  35.   for i = 1, 9 do
  36.     while not turtle.forward() do
  37.     end
  38.   end
  39. end
RAW Paste Data