Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local depth = 0
- while true do
- -- Check if the block below is bedrock
- local success, data = turtle.inspectDown()
- if not success or data.name == "minecraft:bedrock" then
- print("Bedrock or void detected, stopping.")
- break -- Stop if bedrock or void is encountered
- end
- -- Ensure there's enough fuel
- if turtle.getFuelLevel() == 0 then
- print("Out of fuel")
- break
- end
- -- Dig down and move
- turtle.digDown()
- turtle.down()
- depth = depth + 1 -- Count how many times it moves down
- end
- -- Return to surface
- while depth > 0 do
- turtle.up()
- depth = depth - 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement