Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isblock_f(id)
- local success, data = turtle.inspect()
- if success then
- if id == data.name then
- return true
- end
- end
- end
- function isblock_l(id)
- turtle.turnLeft()
- local success, data = turtle.inspect()
- turtle.turnRight()
- if success then
- if id == data.name then
- return true
- end
- end
- end
- function isblock_r(id)
- turtle.turnRight()
- local success, data = turtle.inspect()
- turtle.turnLeft()
- if success then
- if id == data.name then
- return true
- end
- end
- end
- function isblock_u(id)
- local success, data = turtle.inspectUp()
- if success then
- if id == data.name then
- return true
- end
- end
- end
- function isblock_d(id)
- local success, data = turtle.inspectDown()
- if success then
- if id == data.name then
- return true
- end
- end
- end
- function isblock_b(id)
- turtle.turnLeft()
- turtle.turnLeft()
- local success, data = turtle.inspect()
- turtle.turnRight()
- turtle.turnRight()
- if success then
- if id == data.name then
- return true
- end
- end
- end
- function minevein(id)
- if isblock_f(id) then
- print("f")
- turtle.dig()
- turtle.forward()
- return minevein(id)
- end
- if isblock_u(id) then
- print("u")
- turtle.dig()
- turtle.up()
- return minevein(id)
- end
- if isblock_d(id) then
- print("d")
- turtle.dig()
- turtle.down()
- return minevein(id)
- end
- turtle.turnLeft()
- if isblock_f(id) then
- print("l")
- turtle.dig()
- turtle.forward()
- return minevein(id)
- end
- turtle.turnLeft()
- if isblock_f(id) then
- print("b")
- turtle.dig()
- turtle.forward()
- return minevein(id)
- end
- turtle.turnLeft()
- if isblock_f(id) then
- print("r")
- turtle.dig()
- turtle.forward()
- return minevein(id)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement