Game rules control how a Minecraft world behaves, from whether you keep your items on death to how fast crops grow and whether mobs can break blocks. This reference lists every rule with its default value, type and a ready /gamerule command, including the new snake_case names introduced in the 26 update.
Rules are grouped into categories like player, mobs, spawning, drops and world updates. Use the category chips or the search box to find the rule you want, then copy its command set to the default so you only need to change the value.
The names, defaults and types come straight from the game data, so the commands match what the current version accepts. Where the game provides a description for a rule it is shown beneath the rule.
Older guides use the camelCase rule names like keepInventory and doDaylightCycle. Since the 26 update these use snake_case, so the same rules are now keep_inventory and the daylight cycle rule among others. If an old command is not working, it is usually because of this rename; copy the current name from the list above.
Most rules are simple true or false toggles, while a handful take a number, such as the random tick speed, the entity cramming threshold and the spawn radius. The type is reflected in each rule's default value shown in the list.
Use /gamerule <rule> <value>. For a yes or no rule, the value is true or false, for example /gamerule keep_inventory true to keep your items when you die. For a number rule, the value is a number, like /gamerule random_tick_speed 3. Run /gamerule <rule> with no value to see its current setting. Find the rule above and copy its command to get the exact spelling.
Yes. The 26 update changed game rule names from the old camelCase style to snake_case, so keepInventory became keep_inventory and mobGriefing became mob_griefing. Some were also renamed more substantially, such as the daylight cycle rule. The names shown here are the current ones the game expects, so the copied commands work on a current version.
It is now called keep_inventory. When set to true, players keep their items and experience when they die instead of dropping them. It defaults to false. Set it with /gamerule keep_inventory true, which is popular on building and creative-style survival worlds.
Set /gamerule mob_griefing false to stop mobs like creepers, endermen and ravagers from changing blocks, and use the explosion drop decay rules to control whether explosions destroy dropped loot. Each of these rules is listed above with its default and a ready command.
It controls how often random block ticks happen, which drives crop growth, leaf decay, fire spread and similar time-based events. The default is 3. Raising it speeds those processes up (useful for testing farms), and setting it to 0 stops them. Be careful with very high values, as they can cause lag.
Browse more Minecraft tools: