IT IS getting harder to be a bad-boy, or bad-girl, pop star in China. Prudish standards in the state-run entertainment industry keep Chinese performers from treating audiences to the bawdy antics of a Miley Cyrus, or the steamy sex scenes that so often feature in foreign films. But in their private lives, Chinese entertainers can party just as hard as their Western peers. Some have revelled in drugs and prostitutes. But now the party animals are being told by party hacks to behave better—both on screen and off.

A new “Joint Pledge of Self-Discipline in Professional Ethics” for the press, publishing, broadcasting and film industries has recently been signed by 50 official media and entertainment organisations. They, in turn, are expected to enforce the pledge among performers and other employees. Works must refrain from vulgar words or images, instead promoting “healthy” and “advanced” aesthetics, whatever they are. More to the point, the pledge commands support for the Communist Party’s leadership, the national interest and “socialist core values”. It prohibits the voicing of opinions that defame the party or country. It’s a blast.

Also out is behaviour that “violates morals or public order”. Pornography, drugs and gambling are spelled out. Even before the pledge, libertines have paid a price. Last year one big-budget film was in the last stages of editing when its star got arrested in Beijing for smoking weed. The film had to be reshot with a new leading man. Organisations that have signed the pledge are now bound to blacklist violators for up to three years.

In October, a few weeks after the pledge was published, China’s top official in charge of ideology and propaganda, Liu Yunshan, held a gathering with leading figures in art and literature with the aim of promoting the “prosperous development” of those fields. Mr Liu wanted to encourage works embodying the “Chinese dream” and “positive energy”.

These terms come straight from the dogma factory of Xi Jinping, China’s president. He has spoken often—if vaguely—of the Chinese dream as an organising principle for the country’s development. He has also helped turn the term “positive energy” into a catchphrase, one that is repeated in the entertainers’ pledge. Mr Xi used the phrase in October 2014, during a speech on the appropriate role of art and culture. That speech evoked a famous talk about culture given in 1942 by Mao Zedong.

Many of the same buzzwords also appeared in a speech this month by Fan Bingbing, one of the most glamorous boosters of the pledge. Ms Fan has popped up more than once in gossipy tabloid stories. But party hacks were surely thrilled to hear her singing the praises of “socialist core values”. The party animals among her many fans presumably felt differently.