Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local chunksize = 16
- local start_height = 64
- local stop_height = 12
- function digForward()
- while true do
- if turtle.forward() then
- break
- else
- turtle.dig()
- turtle.attack()
- end
- end
- end
- function slice()
- for i=0,chunksize-2 do
- digForward()
- end
- end
- function emptyInv()
- for i=1,15 do
- turtle.select(i)
- turtle.drop(turtle.getItemCount(i))
- end
- turtle.select(1)
- end
- local current_height = start_height;
- for i=stop_height,start_height do
- print("remove flat")
- for i=0,6 do
- slice()
- turtle.turnRight()
- digForward()
- turtle.turnRight()
- slice()
- turtle.turnLeft()
- digForward()
- turtle.turnLeft()
- end
- slice()
- turtle.turnRight()
- digForward()
- turtle.turnRight()
- slice()
- --back to start
- print("back to start")
- turtle.turnRight()
- slice()
- while true do
- print("start empty")
- if current_height == start_height then
- turtle.turnLeft()
- emptyInv()
- turtle.turnLeft()
- turtle.turnLeft()
- while turtle.down() == true do
- turtle.down()
- current_height = current_height - 1;
- end
- turtle.digDown()
- turtle.down()
- break
- else
- turtle.up()
- current_height = current_height + 1;
- end
- end
- current_height = current_height - 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement