while true do
data={turtle.inspect()}
if data~=nil then
if data[2].metadata==7 then
turtle.dig()
end
if turtle.getItemCount(1)>0 then
turtle.place()
sleep(0)