Updated:

Enable Spawner Blocks game rule (spawner_blocks_work)

The "Enable Spawner Blocks" rule is called spawner_blocks_work in Java 1.21.11 and later, and spawnerBlocksEnabled in 1.21.10 and earlier. Controls whether spawner blocks spawn mobs.

Basic data

NameEnable Spawner Blocks
Rule name (Java 1.21.11+)spawner_blocks_work
Old name (Java 1.21.10 and earlier)spawnerBlocksEnabled
Bedrock nameNo rule with the same name
Value typetrue / false
Defaulttrue

Commands you can copy

Turn off (false)

/gamerule spawner_blocks_work false

Reset to the default (true)

/gamerule spawner_blocks_work true

Check the current value

/gamerule spawner_blocks_work

Java 1.21.10 and earlier

/gamerule spawnerBlocksEnabled false

Notes

Questions

Typing spawnerBlocksEnabled gives an error

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

How do I check the current value?

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

Other game rules