China doesn't really care about being a "world power." They don't care a lot about Africa or South America or Europe.
They DO want to be #1 on their block. Japan, Thailand, Russia, India, Australia, Vietnam...they want to be unchallenged in their own sphere. The US is too influential over there for them. They want the trade, they don't want political interference. So while calling Russia a "regional" power was an insult to Putin's ideals, China WANTS to be a regional power. They don't like the US being a power in their region as we aren't located there.
Would China attack the US? Mainland, Alaska, even Hawaii? I don't think so. Would they attack a US base near them if things went south? That I could believe. In South Korea or some other "nearby" location, yes, if they felt we were interfering with their affairs too much.
I also get the feeling they might have that "Pearl Harbor" mentality of striking and inflicting damage, then sitting back and saying "hey, we don't a war, we did what we set out to (teach you a lesson) and we're satisfied if it goes no farther." Depends on whether they pay attention to WWII history or not. They have a curious outlook on history, between ancient and recent, so it's hard to say how they'd think about it.