gamerule
Gamerule, or game rule, is a command feature in Minecraft that allows players and server administrators to adjust core gameplay mechanics for a world session. These rules affect how the game behaves in areas such as weather, daylight,Mob behavior, and item handling, enabling customized or challenge-oriented play.
In Minecraft, the command is generally issued as /gamerule <rule> [value]. A rule can be boolean (true
Gamerules are world-scoped and persist with the save file. They can be adjusted during play without restarting
Common examples of gamerules include:
- doDaylightCycle (boolean): whether the day-night cycle runs.
- doWeatherCycle (boolean): whether weather changes occur.
- keepInventory (boolean): whether players keep items on death.
- doMobSpawning (boolean): whether mobs spawn.
- doTileDrops (boolean): whether blocks drop items when broken.
- doFireTick (boolean): whether fire spreads and burns.
- randomTickSpeed (integer): rate of random block updates.
- maxEntityCramming (integer): maximum entities allowed per block space.
- spawnRadius (integer): distance from players where mobs can spawn.
Notes: the availability and naming of rules can differ by edition and version, and changing rules