Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local LENGTH = 16
- local WIDTH = 16
- local HEIGHT = 16
- local function leftRes()
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- turtle.digUp()
- end
- local function rightRes()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.digUp()
- end
- local function initDig()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- end
- local function reset(mw)
- turtle.turnRight()
- for _ = 1, mw do
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.digDown()
- turtle.down()
- end
- local function mainMine(ml, mw, mh)
- initDig()
- local isTurningLeft = true
- for i = 1, mh do --height
- for j = 1, mw do --width
- for k = 1, ml - 1 do --length
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- end
- if isTurningLeft then
- leftRes()
- else
- rightRes()
- end
- isTurningLeft = not isTurningLeft
- end
- reset(mw)
- end
- end
- mainMine(LENGTH, WIDTH, HEIGHT)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement