miniMiner

                Never    
Lua
       
blocksTravelled = 0

function mineSection()
    while not turtle.forward() do
        turtle.dig()
    end
    turtle.digUp()
    turtle.digDown()
end

function doesTurtleHaveSpace()
    isTrue = false
    for index = 1, 16, 1 do
        data = turtle.getItemDetail(index)
        if data == nil then
            index = 16
            isTrue = true
        end
    end
    return isTrue
end

function fuelUpBaby()
    for i = 1, 16, 1 do
        turtle.refuel(i)
    end
end

function goHome(index)
    print("Returning Home")
    fuelUpBaby()
    turtle.turnLeft()
    turtle.turnLeft()
    for i = 1, blocksTravelled, 1 do
        while not turtle.forward() do
            turtle.dig()
        end
    end
end

function tunnel()
    while doesTurtleHaveSpace() and blocksTravelled < 128 do
        mineSection()
        blocksTravelled = blocksTravelled + 1
        print(blocksTravelled)
    end
end

function clearStones()
    for i = 1, 16, 1 do
        data = turtle.getItemDetail(i)
        if data ~= nil then
            if data.name == "minecraft:cobblestone" or data.name == "minecraft:stone" or data.name == "minecraft:dirt" or data.name == "quark:biome_cobblestone" then
                turtle.select(i)
                turtle.drop()
            end
        end
    end
    turtle.select(1)        
end

function main()
    while doesTurtleHaveSpace() and blocksTravelled < 128 do
        tunnel()
        clearStones()
    end
    
    goHome()
    print("done")
end

turtle.refuel()
main()
turtle.select(1)