It's quite simple, actually: during the recent visit by President Xi Jinping in Pakistan, Beijing and Islamabad signed a number of deals, worth US$ 46 billion (for some of details, see here).

These are including construction of a natural gas pipeline from Iran to Pakistan, and then building up an entire 'China-Pakistan Economic Corridor' (CPEC), which is including a network of roads, railways and pipelines between Gwadar, Lahore and Islamabad in Pakistan and Xinjiang region in China, plus expansion of Pakistani ports.

With other words: 'sorry Saudis', but since you're not investing as much into Pakistan (or if, then only into local nuclear weapons and madrasses for training of Jihadists), Chinese are far more interesting.