Updated:

Allow spectators to generate terrain game rule (spectators_generate_chunks)

The "Allow spectators to generate terrain" rule is called spectators_generate_chunks in Java 1.21.11 and later, and spectatorsGenerateChunks in 1.21.10 and earlier. Controls whether players in spectator mode generate new terrain.

Basic data

NameAllow spectators to generate terrain
Rule name (Java 1.21.11+)spectators_generate_chunks
Old name (Java 1.21.10 and earlier)spectatorsGenerateChunks
Bedrock nameNo rule with the same name
Value typetrue / false
Defaulttrue

Commands you can copy

Turn off (false)

/gamerule spectators_generate_chunks false

Reset to the default (true)

/gamerule spectators_generate_chunks true

Check the current value

/gamerule spectators_generate_chunks

Java 1.21.10 and earlier

/gamerule spectatorsGenerateChunks false

Notes

Questions

Typing spectatorsGenerateChunks gives an error

In Java 1.21.11 and later the rule is called spectators_generate_chunks. Write /gamerule spectators_generate_chunks … instead. Worlds on 1.21.10 and earlier keep the old name.

How do I check the current value?

Run /gamerule spectators_generate_chunks without a value. The current value is shown in chat.

Other game rules