Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local len = 16
- while true do
- while turtle.getFuelLevel() < (2 * len) + 80 do
- print("refueling...")
- turtle.select(16)
- turtle.suckUp(1)
- turtle.refuel()
- end
- while redstone.getInput("bottom") == false do
- print("waiting for redstone input")
- os.sleep(1)
- end
- local index = len
- while index > 0 do
- local success, data = turtle.inspectDown()
- if success then
- print("Block metadata: ", data.metadata)
- if data.metadata == 7 then
- turtle.digDown()
- turtle.select(1)
- turtle.placeDown()
- end
- end
- turtle.forward()
- index = index - 1
- end
- turtle.turnLeft()
- turtle.turnLeft()
- index = len
- while index > 0 do
- turtle.forward()
- index = index - 1
- end
- turtle.turnLeft()
- turtle.turnLeft()
- end
Add Comment
Please, Sign In to add comment