Advertisement
Epolopsy

Simple turtle quarry miner

May 19th, 2022 (edited)
752
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function bedrockChecker()
  2.     booly, data = turtle.inspectDown()
  3.     if (data.name) == "minecraft:bedrock" then
  4.         return 1
  5.     else
  6.         return 0
  7.     end
  8. end
  9.  
  10. function digDown()
  11.     isBedrock = bedrockChecker()
  12.     i = 0
  13.     while isBedrock == 0 do
  14.         turtle.digDown()
  15.         turtle.down()
  16.         i = i + 1
  17.         isBedrock = bedrockChecker()
  18.     end
  19.     repeat
  20.         turtle.up()
  21.         i = i - 1
  22.     until (i == 0)
  23. end
  24.      
  25. function moveForward()
  26.     turtle.dig()
  27.     turtle.forward()
  28. end
  29.  
  30. function chunkQuarryLength(length)
  31.     for s = length, 1, -1
  32.     do
  33.         digDown()
  34.         moveForward()
  35.         print(s)
  36.     end
  37. end
  38.  
  39. function fullQuarry(size)
  40.     for w = size, 1, -1
  41.     do
  42.         chunkQuarryLength(size)
  43.         turtle.turnLeft()
  44.         turtle.forward()
  45.         turtle.turnRight()
  46.         for a = size, 1, -1
  47.         do
  48.             turtle.back()
  49.         end
  50.     end
  51. end
  52. turtle.refuel()
  53. fullQuarry(16)
Advertisement
RAW Paste Data Copied
Advertisement