Since Java 1.21.11 the gamerules have new names in snake_case, and some were renamed completely. If
The full IDs carry a namespace (for example
On Bedrock it is still
/gamerule keepInventory true suddenly says "unknown", this is why. Bedrock still uses the old names.Old name → new name (Java)
| Before | Now |
|---|---|
| keepInventory | keep_inventory |
| doDaylightCycle | advance_time |
| doWeatherCycle | advance_weather |
| doMobSpawning | spawn_mobs |
| mobGriefing | mob_griefing |
| doInsomnia (phantoms) | spawn_phantoms |
| doImmediateRespawn | immediate_respawn |
| naturalRegeneration | natural_health_regeneration |
| playersSleepingPercentage | players_sleeping_percentage |
| announceAdvancements | show_advancement_messages |
| showDeathMessages | show_death_messages |
| randomTickSpeed | random_tick_speed |
| spawnRadius | respawn_radius |
| pvp | pvp |
minecraft:keep_inventory), but typing the short name works in the command.Copy-paste examples
/gamerule keep_inventory true
/gamerule advance_time false
/gamerule spawn_phantoms false
/gamerule players_sleeping_percentage 50On Bedrock it is still
/gamerule keepinventory true.