Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- A different version of my chunk clearing to bedrock program that goes one level at a time instead of strip mining up and down
- -- like a sewing needle. The idea here is if I go down with the turtle I should be able to patch fluids as we go to (hopefully)
- -- avoid ending up with a hole full of water; which has happened enough lately to justify the rewrite.
- width=16 -- usually 16 but can be smaller for troubleshooting/testing
- -- depth=3 -- dito, worth doing enough to ensure the level transitions work
- -- kickstart to get on the 3 block cycle
- turtle.up()
- turtle.placeDown()
- local function digger()
- while not turtle.forward() do
- turtle.dig() -- should overcome sand and gravel
- end
- turtle.digUp()
- turtle.digDown()
- end
- local function flip(flipper)
- if flipper==0 then
- turtle.turnRight()
- digger()
- turtle.turnRight()
- else
- turtle.turnLeft()
- digger()
- turtle.turnLeft()
- end
- end
- -- for z=1,depth do
- while turtle.digDown() do -- should fail when we get to bedrock
- turtle.down()
- turtle.digDown()
- turtle.down()
- turtle.digDown()
- turtle.down()
- turtle.digDown()
- flop=0
- for y=1,width do
- for x=1,width-1 do -- -1 because the turtle takes up a spot.
- digger()
- end
- print(y)
- if y~=width then
- flip(flop)
- flop=1-flop
- end
- end
- turtle.digDown()
- if flop==1 then
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- turtle.placeDown()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement