Looking at a list of Chinese inventions, it seems as though everything that had been invented in Europe or the Middle East had been independently invented in China before or at the same time. I've heard that in the 16th century, Japan had the most advanced firearms which then disseminated into China. Did technology not spread as fast throughout the country? It seems like during the Industrial Revolution as soon as something was invented, like cheap textile manufacturing, it became widespread almost instantly. Was Europe only superior to China in terms of military might? Or did they just manage to catch them at a bad time, like with the Inka?
To answer this would take an essay - I recommend reading 'The Great Divergence' by Kenneth Pomeranz for a full and accurate explanation of the differing fates of Europe and China.