Advertisement
rungholt

tBedrockLadder

May 16th, 2022
532
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function detectAndPlace()
  2.     if turtle.detect() == false then
  3.         turtle.place(1)
  4.     end
  5. end
  6.  
  7. local function checkSides()
  8.     detectAndPlace()
  9.     turtle.turnLeft()
  10.     detectAndPlace()
  11.     turtle.turnLeft()
  12.     detectAndPlace()
  13.     turtle.turnLeft()
  14.     detectAndPlace()
  15.     turtle.turnLeft()
  16. end
  17.  
  18. local function placeLadder()
  19.     if turtle.detect() then
  20.         turtle.dig()
  21.         turtle.select(16)
  22.         turtle.place(1)
  23.     end
  24. end
  25.  
  26. local times = 0
  27. term.write("How deep:")
  28. times = read()
  29. for j = 1, times do
  30.     turtle.digDown()
  31.     turtle.down()
  32.     checkSides()
  33. end
  34. for k = 1, times do
  35.     placeLadder()
  36.     turtle.up()
  37. end
  38.  
Advertisement
RAW Paste Data Copied
Advertisement