/gameruleThe /gamerule command changes world settings that affect gameplay. Changes persist across sessions and are saved with the world. Omit the value to query the current setting.
The /gamerule command changes world settings that affect how Minecraft plays, from keeping your inventory on death to the speed of crop growth. This generator lists every vanilla gamerule with its type, default value, and a plain-English description, then builds the exact command to copy.
The syntax is /gamerule [rule] [value]. Running a rule with no value queries its current setting, while adding a value sets it. Boolean rules take true or false; integer rules take a whole number.
The in-game autocomplete lists rules alphabetically with no descriptions, defaults, or types. This tool fixes that by showing each rule grouped by category so you can find the right one and know what it does before you change it.
| Gamerule | Default | Effect |
|---|---|---|
| keepInventory | false | Players keep items and XP on death |
| mobGriefing | true | Mobs can change blocks (Creepers, Endermen, Withers) |
| doFireTick | true | Fire spreads and burns out over time |
| randomTickSpeed | 3 | Speed of random block updates like crop growth |
| doDaylightCycle | true | Time of day advances on its own |
| playersSleepingPercentage | 100 | Percent of players who must sleep to skip night |
| maxEntityCramming | 24 | Entities per block before suffocation damage |
| commandModificationBlockLimit | 32768 | Max blocks a /fill or /clone can change |
Tip: set playersSleepingPercentage to 0 so a single sleeping player skips the night for everyone, or raise randomTickSpeed well above 3 to grow crops fast (it also speeds up fire and leaf decay).
1. Search or browse the list, then click a rule to see its type, default, and description.
2. Toggle a boolean rule or type an integer. The command updates live as you change the value.
3. Copy the command and paste it into your Minecraft chat or a command block. Gamerules are saved per world in level.dat, so you only set them once.
The syntax is /gamerule <rule> [value]. To query a rule, omit the value: /gamerule keepInventory. To set it, include the value: /gamerule keepInventory true. Boolean rules accept true or false; integer rules accept whole numbers.
Bedrock Edition supports many of the same gamerules, but the list is not identical. Some rules share the same name across both editions, like keepInventory, while others exist only on Java or use different naming on Bedrock.
randomTickSpeed controls the frequency of random block updates. The default value is 3. Higher values accelerate crop growth, leaf decay, fire spread, and vine growth. Setting it to 0 halts all random ticks, freezing those mechanics.
In singleplayer, you can set some gamerules from the world creation screen before starting, or open the world to LAN with cheats enabled. On servers, any operator can run /gamerule commands directly without a separate cheats toggle.
Yes. Gamerules are saved per world in the level.dat file and survive restarts. You only need to set a rule once and it stays until you change it again, so a single /gamerule command sticks for the life of the world.
Browse more Minecraft tools: