Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local worked,block=turtle.inspectDown()
- local blockName=block.name
- function checkFront()
- worked,block=turtle.inspect()
- if worked and block.name==blockName then
- turtle.dig()
- i=i+1
- turtle.forward()
- spin()
- i=i-1
- if i==-1 then return end
- turtle.back()
- end
- end
- function checkDown()
- worked,block=turtle.inspectDown()
- if worked and block.name==blockName then
- turtle.digDown()
- i=i+1
- turtle.down()
- spin()
- i=i-1
- if i==-1 then return end
- turtle.up()
- end
- end
- function checkUp()
- worked,block=turtle.inspectUp()
- if worked and block.name==blockName then
- turtle.digUp()
- i=i+1
- turtle.up()
- spin()
- i=i-1
- if i==-1 then return end
- turtle.down()
- end
- end
- function spin()
- checkDown()
- for _=1,4 do
- checkFront()
- turtle.turnLeft()
- end
- checkUp()
- end
- i=0
- spin()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement