Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local arg = { ... }
- function handleLava( isUp )
- local iSuccess, iData
- if isUp then
- iSuccess, iData = turtle.inspectUp()
- if iSuccess then
- if iData == "minecraft:lava" then
- turtle.select(1)
- turtle.placeUp()
- end
- end
- else
- iSuccess, iData = turtle.inspect()
- if iSuccess then
- if iData == "minecraft:lava" then
- turtle.select(1)
- turtle.place()
- end
- end
- end
- end
- function digFront()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.up()
- turtle.down()
- end
- function checkFront()
- handleLava(false)
- turtle.up()
- handleLava(false)
- handleLava(true)
- end
- for i = 0, arg[1] do
- digFront()
- checkFront()
- turtle.turnLeft()
- digFront()
- checkFront()
- turtle.turnRight()
- checkFront()
- turtle.turnRight()
- turtle.forward()
- digFront()
- checkFront()
- turtle.turnLeft()
- checkFront()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement