Advertisement
HunterFacts

mine_cc

Jun 3rd, 2025 (edited)
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.13 KB | None | 0 0
  1. -- Check and dig the block in front
  2. function tryDigForward()
  3.     local success, data = turtle.inspect()
  4.     if success and data.name == "minecraft:ancient_debris" then
  5.         print("Found ancient debris ahead! Digging it.")
  6.     end
  7.     turtle.dig()
  8.     turtle.forward()
  9. end
  10.  
  11. -- Check and dig the block above
  12. function tryDigUp()
  13.     local success, data = turtle.inspectUp()
  14.     if success and data.name == "minecraft:ancient_debris" then
  15.         print("Found ancient debris above! Digging it.")
  16.     end
  17.     turtle.digUp()
  18. end
  19.  
  20. -- Check and dig the block below
  21. function tryDigDown()
  22.     local success, data = turtle.inspectDown()
  23.     if success and data.name == "minecraft:ancient_debris" then
  24.         print("Found ancient debris below! Digging it.")
  25.     end
  26.     turtle.digDown()
  27. end
  28.  
  29. -- Dig a straight tunnel and check for ancient debris
  30. function digTunnel(length)
  31.     for i = 1, length do
  32.         tryDigForward()
  33.         tryDigUp()
  34.         tryDigDown()
  35.     end
  36. end
  37.  
  38. -- Start the program
  39. print("Starting tunnel excavation in search of ancient debris...")
  40. digTunnel(5)  -- You can increase or decrease the length
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement