Advertisement
Hopfi

nice_down_shaft

May 8th, 2021
1,014
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1.  
  2. -- build mining shaft downwards with height 3
  3. N = 5
  4.  
  5. function digOneLayer()
  6.     turtle.dig()
  7.     turtle.forward()
  8.     turtle.digUp()
  9.     turtle.up()
  10.     turtle.digUp()
  11.     turtle.down()
  12. end
  13.  
  14.  
  15. turtle.refuel()
  16. for i=1, N, 1 do
  17.  
  18.     digOneLayer()
  19.  
  20.     -- move to left
  21.     turtle.back()
  22.     turtle.turnLeft()
  23.     turtle.dig()
  24.     turtle.forward()
  25.     turtle.turnRight()
  26.  
  27.     digOneLayer()
  28.  
  29.     -- fix position again
  30.     turtle.turnRight()
  31.     turtle.forward()
  32.     turtle.turnLeft()
  33.  
  34.     turtle.digDown()
  35.     turtle.down()
  36. end
  37.  
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement