China had a long history of self-sufficiency and technological advancement before the 18th century when they first encountered Western influence. They produced enough crops and goods like porcelain to support their population without needing trade. In the 18th century, a British ambassador showed Chinese inventions like clocks and balloons to the emperor, but China was unimpressed as they already had more advanced versions. In the 19th century, the British began smuggling highly addictive opium into China against the Chinese government's wishes. When China tried to stop the opium trade, it led to the Opium War in 1839 where Britain easily defeated China's outdated navy. In 1842, China was forced to sign the unequal Treaty of Nanjing