Advertisement
Fadamaka

CC digger

Feb 26th, 2023 (edited)
490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. args = {...}
  2. intDigDistance = args[1]
  3.  
  4. local hasBlock, data
  5. for i = 1,intDigDistance,1
  6. do
  7.     if(turtle.getFuelLevel()<2)
  8.     then
  9.         turtle.select(1)
  10.         turtle.refuel()
  11.     end
  12.     hasBlock, data = turtle.inspect()
  13.     if(hasBlock and data.name=="minecraft:deepslate_diamond_ore")
  14.     then
  15.         break
  16.     end
  17.     while(turtle.dig())
  18.     do
  19.     end
  20.     turtle.forward()
  21.     hasBlock, data = turtle.inspectUp()
  22.     if(hasBlock and data.name=="minecraft:deepslate_diamond_ore")
  23.     then
  24.         break
  25.     end
  26.     turtle.digUp()
  27.     hasBlock, data = turtle.inspectDown()
  28.     if(hasBlock and data.name=="minecraft:deepslate_diamond_ore")
  29.     then
  30.         break
  31.     end
  32.     turtle.digDown()
  33.     if(i%7==0)
  34.     then
  35.         turtle.select(2)
  36.         turtle.placeDown()
  37.     end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement