Updated:
Spawn mobs game rule (spawn_mobs)
The "Spawn mobs" rule is called spawn_mobs in Java 1.21.11 and later, and doMobSpawning in 1.21.10 and earlier. Controls whether mobs spawn naturally.
Basic data
| Name | Spawn mobs |
|---|---|
| Rule name (Java 1.21.11+) | spawn_mobs |
| Old name (Java 1.21.10 and earlier) | doMobSpawning |
| Bedrock name | domobspawning |
| Value type | true / false |
| Default | true |
Commands you can copy
Turn off (false)
/gamerule spawn_mobs falseReset to the default (true)
/gamerule spawn_mobs trueCheck the current value
/gamerule spawn_mobsJava 1.21.10 and earlier
/gamerule doMobSpawning falseBedrock Edition
/gamerule domobspawning falseNotes
- Java 1.21.11 renamed game rules to lower case with underscores. If an older command or a map description uses the old name, rewrite it for your version.
- Game rules are saved per world. On a server, a new world starts with the default values again.
Questions
Typing doMobSpawning gives an error
In Java 1.21.11 and later the rule is called spawn_mobs. Write /gamerule spawn_mobs … instead. Worlds on 1.21.10 and earlier keep the old name.
How do I check the current value?
Run /gamerule spawn_mobs without a value. The current value is shown in chat.