function findSomething() foundAnything = false for i = 1, 16 do Data = turtle.getItemDetail() if Data ~= nil then turtle.select(i) foundAnything = true break end end return foundAnything end findSomething() turtle.placeDown() while turtle.forward() and findSomething() do turtle.placeDown() end