China has been quick to use its rising economic strength to punish countries that defy it.