minecraft
"Gamerule" redirects here. For the command, see Commands/gamerule.
"Rules" redirects here. For rules about the Minecraft Fandom Wiki, see Minecraft Wiki:Rules.

Game rules are a set of customizable options for a specific in-game world.

Modifying game rules

The "Edit Game Rules" section of the "Create World" screen on .

The "Edit Game Rules" section of the "Create World" screen on Java Edition.

In Java Edition, game rules can be changed using toggle buttons on the "Edit Game Rules" menu built into the "Create World" screen. The game rules are split into categories named "Player", "Mobs", "Spawning", "Drops", "World updates", "Chat", and "Miscellaneous".

In Bedrock Edition, about half of the game rules can be changed using toggles on the "World settings" and "Cheats" sections of the world's Game settings screen. The remainder can be changed only with commands.

When in-game, game rules can be changed using the /gamerule command, using the syntax /gamerule <rule> [<value>], where <rule> is the name of the game rule and <value> is an allowed value, which depends on the type of the game rule. The types are boolean (where the allowed values are either true or false) and integer (where any whole number is able to be entered).

List of game rules

This section is missing information about the Bedrock Edition game rule "showBorderEffect". 
Please expand the section to include this information. Further details may exist on the talk page.

The following is a list of game rules available in-game, their allowed values, and their availability in Java Edition and Bedrock Edition.

List of game rules
Rule name Description Default value Type Availability
Java Bedrock
announceAdvancements Whether advancements should be announced in chat. true Bool Yes No
blockExplosionDropDecay
Whether block loot is dropped by all blocks (false) or randomly (true) depending on how far the block is from the center of a block explosion (e.g. clicking a bed in dimensions other than the Overworld). true Bool Yes No
commandBlocksEnabled Whether command blocks should be enabled in-game. true Bool No Yes
commandBlockOutput Whether command blocks should notify admins when they perform commands. true Bool Yes Yes
commandModificationBlockLimit Controls the maximum number of blocks changed when using /clone, /fill, or /fillbiome. 32768 Int Yes No
disableElytraMovementCheck Whether the server should skip checking player speed when the player is wearing elytra. Often helps with jittering due to lag in multiplayer. false Bool Yes No
disablePlayerMovementCheck Whether the server should skip checking player speed. false Bool Yes No
disableRaids Whether raids are disabled. false Bool Yes No
doDaylightCycle Whether the daylight cycle and moon phases progress. true Bool Yes Yes
doEntityDrops Whether entities that are not mobs should have drops. true Bool Yes Yes
doFireTick Whether fire should spread and naturally extinguish. true Bool Yes Yes
doInsomnia Whether phantoms can spawn in the nighttime. true Bool Yes Yes
doImmediateRespawn Players respawn immediately without showing the death screen. false Bool Yes Yes
doLimitedCrafting Whether players can craft only those recipes that they have unlocked. false Bool Yes Yes
doMobLoot Whether mobs should drop items and experience orbs. true Bool Yes Yes
doMobSpawning Whether mobs should naturally spawn. Does not affect monster spawners. true Bool Yes Yes
doPatrolSpawning Whether patrols can spawn. true Bool Yes No
doTileDrops Whether blocks should have drops. true Bool Yes Yes
doTraderSpawning Whether wandering traders can spawn. true Bool Yes No
doVinesSpread Whether vines can spread to other blocks. Cave vines, weeping vines, and twisting vines are not affected. true Bool Yes No
doWeatherCycle Whether the weather can change naturally. The /weather command can still change weather. true Bool Yes Yes
doWardenSpawning Whether wardens can spawn. true Bool Yes No
drowningDamage Whether the player should take damage when drowning. true Bool Yes Yes
enderPearlsVanishOnDeath Controls whether thrown ender pearls vanish when the player dies. true Bool Yes No
fallDamage Whether the player should take fall damage. true Bool Yes Yes
fireDamage Whether the player should take damage in fire, lava, campfires, or on magma blocks. true Bool Yes Yes
forgiveDeadPlayers Makes angered neutral mobs stop being angry when the targeted player dies nearby. true Bool Yes No
freezeDamage Whether the player should take damage when inside powder snow. true Bool Yes Yes
globalSoundEvents
Whether certain sound events are heard by all players regardless of location. true Bool Yes No
functionCommandLimit The maximum number of commands that can be executed by /function at once. 10000 Int No Yes
keepInventory Whether the player should keep items and experience in their inventory after death. false Bool Yes Yes
lavaSourceConversion
Whether new sources of lava are allowed to form. false Bool Yes No
logAdminCommands Whether to log admin commands to server log. true Bool Yes No
maxCommandChainLength The maximum length of a chain of commands that can be executed during one tick. Applies to command blocks and functions. 65536 Int Yes Yes
maxCommandForkCount ? 65536 Int Yes No
maxEntityCramming The maximum number of pushable entities a mob or player can push, before taking 6♥♥♥ entity cramming damage per half-second. Setting to 0 or lower disables the rule. Damage affects Survival-mode or Adventure-mode players, and all mobs but bats. Pushable entities include non-Spectator-mode players, any mob except bats, as well as boats and minecarts. 24 Int Yes No
minecartMaxSpeed The maximum speed in which minecarts can go. 8 Int Yes No
mobExplosionDropDecay
Whether block loot is dropped by all blocks (false) or randomly (true) depending on how far the block is from the center of a mob explosion (e.g. Creeper explosion). true Bool Yes No
mobGriefing Whether creepers, zombies, endermen, ghasts, withers, ender dragons, rabbits, sheep, villagers, silverfish, snow golems, and end crystals[BE only] should be able to change blocks, and whether mobs can pick up items. When mobGriefing is disabled, piglins do not pick up gold ingots, but a player can still barter with them by using the item on the mob. Similarly, villagers do not pick up food items but can still breed until they run out of any food already in their inventory. This also affects the capability of zombie-like creatures like zombified piglins and drowned to pathfind to turtle eggs. true Bool Yes Yes
naturalRegeneration Whether the player can regenerate health naturally if their hunger is full enough (doesn't affect external healing, such as golden apples, the Regeneration effect, etc.). true Bool Yes Yes
playersNetherPortalCreativeDelay Control how many ticks the player in Creative has to wait in the nether portal in order to travel through dimensions through it. 1 Int Yes No
playersNetherPortalDefaultDelay Control how many ticks the player in Survival or Adventure mode has to wait in the nether portal in order to travel through dimensions through it. 80 Int Yes No
playersSleepingPercentage What percentage of players in the Overworld must sleep to skip the night. A percentage value of 0 or less will allow the night to be skipped by just 1 player, and a percentage value more than 100 will prevent players from ever skipping the night. 100 Int Yes Yes
projectilesCanBreakBlocks Control whenever do projectiles can break blocks (like trident breaks pointed dripstone). true Bool Yes No
pvp Whether the player can fight with other players. true Bool No Yes
randomTickSpeed How often a random block tick occurs (such as plant growth, leaf decay, etc.) per chunk section per game tick. 0 and negative values disables random ticks, higher numbers increase random ticks. Setting to a high integer results in high speeds of decay and growth. Numbers over 4096 make plant growth or leaf decay instantaneous. 3[JE only]
1[BE only]
Int Yes Yes
recipesUnlock Controls whether the player needs to collect items to unlock recipes in the recipe book. true Bool No Yes
reducedDebugInfo Whether the debug screen shows all or reduced information; and whether the effects of F3 + B (entity hitboxes) and F3 + G (chunk boundaries) are shown. false Bool Yes No
respawnBlocksExplode Prevents beds/respawn anchors from exploding in other dimensions. true Bool No Yes
sendCommandFeedback Whether the feedback from commands executed by a player should show up in chat. Also affects the default behavior of whether command blocks store their output text. true Bool Yes Yes
showBorderEffect Whether border blocks create red particles that float up to indicate a border. true Bool No Yes
showCoordinates Whether the player's coordinates are displayed. true Bool No Yes
showDeathMessages Whether death messages are put into chat when a player dies. Also affects whether a message is sent to the pet's owner when the pet dies. true Bool Yes Yes
showTags Hides the "Can place on" and "Can destroy" block lists from item lore, as well as item lock indicators. true Bool No Yes
snowAccumulationHeight The maximum number of snow layers that can be accumulated on each block. 1 Int Yes No
spawnChunkRadius Control the radius of the spawn chunk. 2 Int Yes No
spawnRadius The number of blocks outward from the world spawn coordinates that a player spawns in when first joining a server or when dying without a personal spawnpoint. Has no effect on servers where the default game mode is Adventure. 10 Int Yes Yes
spectatorsGenerateChunks Whether players in Spectator mode can generate chunks. true Bool Yes No
tntExplodes Whether TNT explodes after activation. true Bool No Yes
tntExplosionDropDecay Whether block loot is dropped by all blocks (false) or randomly (true) depending on how far the block is from the center of a TNT explosion. false Bool Yes Yes
universalAnger Makes angered neutral mobs attack any nearby player, not just the player that angered them. Works best if forgiveDeadPlayers is disabled. false Bool Yes No
waterSourceConversion
Whether new sources of water are allowed to form. true Bool Yes No

Additional behavior

Jigsaw Block (top texture) JE2 BE2
This section needs expansion. 
You can help by expanding it.

This section explains more complex behaviors of certain gamerules.

History

Java Edition
1.4.212w32aAdded /gamerule.
Added the following gamerules:
  • doFireTick
  • mobGriefing
  • keepInventory
  • doMobSpawning
  • doMobLoot
  • doTileDrops
12w38aAdded game rule commandBlockOutput.
1.6.113w23aAdded game rule naturalRegeneration.
13w24aAdded game rule doDaylightCycle.
1.814w03aAdded game rule logAdminCommands.
14w10aAdded game rule showDeathMessages.
14w17aAdded game rule randomTickSpeed.
14w26aAdded game rule sendCommandFeedback.
14w29aAdded game rule reducedDebugInfo.
Added the ability to create dummy game rules.
1.8.1pre1Added game rule doEntityDrops.
Game rule doTileDrops no longer affects entities.
1.915w37aAdded game rule spectatorsGenerateChunks.
15w51aAdded game rule spawnRadius.
16w07aAdded game rule disableElytraMovementCheck.
1.1116w38aAdded game rule doWeatherCycle.
Added game rule maxEntityCramming.
1.1217w13aAdded game rule doLimitedCrafting.
17w16bAdded game rule maxCommandChainLength.
17w18aAdded game rule announceAdvancements.
pre1Added game rule gameLoopFunction.
1.1317w45aRemoved the ability to create custom game rules.
17w49bRemoved game rule gameLoopFunction.
1.14.3pre3Added game rule disableRaids.
1.1519w36aAdded game rule doInsomnia.
Added game rule doImmediateRespawn.
Added game rule drowningDamage.
Added game rule fallDamage.
Added game rule fireDamage.
1.15.2pre1Added game rule doPatrolSpawning.
Added game rule doTraderSpawning.
1.1620w17aGame rules can now be changed upon world creation.
pre1Added game rule universalAnger.
Added game rule forgiveDeadPlayers.
1.1720w48aAdded game rule freezeDamage.
20w51aAdded game rule playersSleepingPercentage.
1.1922w16aAdded game rule doWardenSpawning.
1.19.322w44aAdded the following game rules:
  • blockExplosionDropDecay
  • mobExplosionDropDecay
  • tntExplosionDropDecay
  • snowAccumulationHeight
  • waterSourceConversion
  • lavaSourceConversion
  • globalSoundEvents
1.19.423w03aAdded game rule commandModificationBlockLimit.
23w06aAdded game rule doVinesSpread.
1.20.223w31aThe randomTickSpeed game rule now affects the formation of snow and ice.[9]
pre1Added game rule enderPearlsVanishOnDeath.
Pocket Edition
1.0.5alpha 1.0.5.0Added /gamerule.
Added game rule drowningDamage.
Added game rule fallDamage.
Added game rule fireDamage.
Added game rule pvp.
1.1.0alpha 1.1.0.0Added game rule doDaylightCycle.
Added game rule doEntityDrops.
Added game rule doFireTick.
Added game rule doMobSpawning.
Added game rule doMobLoot.
Added game rule doTileDrops.
Added game rule doWeatherCycle.
Added game rule keepInventory.
Added game rule mobGriefing.
Bedrock Edition
1.6.0beta 1.6.0.6Added game rule doInsomnia.
1.7.0beta 1.7.0.2Added game rule commandBlocksEnabled.
1.8.0beta 1.8.0.8Added game rule randomTickSpeed.
1.9.0beta 1.9.0.0Added game rule showDeathMessages.
Added game rule immediateRespawn.
Added game rule functioncommandlimit.
1.12.0beta 1.12.0.2Added game rule spawnRadius.
Added game rule sendCommandBlockFeedback.
?Added game rule commandBlockOutput.
Added game rule maxCommandChainLength.
Added game rule naturalRegeneration.
Added game rule sendCommandFeedback.[verify]
Added game rule showCoordinates.
Added game rule tntExplodes.
1.14.0Added game rule showTags.
?Removed the ability to create dummy gamerules.
1.16.210beta 1.16.210.53Added game rule freezeDamage.
1.17.30beta 1.17.20.20Added game rule respawnBlocksExplode.
?Added game rule showBorderEffect.
1.20.30beta 1.20.20.21Added game rule playersSleepingPercentage.
Added game rule recipesUnlock.
beta 1.20.30.20Added game rule doLimitedCrafting.
beta 1.20.30.22The recipesUnlock game rule is now set to true by default.
Upcoming Bedrock Edition
1.20.40beta 1.20.40.22The spawnRadius game rule is now set to 10 by default to match Java Edition.

Gallery

References

  1. MC-154922
  2. MCPE-73842
  3. MC-67352 — resolved as "Works As Intended".
  4. MC-108353 — resolved as "Works As Intended".
  5. MC-93820 — Rain filling cauldrons is not affected by randomTickSpeed
  6. MC-249308
  7. MC-261250 — resolved as "Invalid".
  8. "Revamped anger management for neutral mobs in minecraft. Now angered neutral mobs won't attack innocent bystanders, won't forget you just cuz you log out & log in, and won't keep killing you after you die & respawn. Etc. Find anything wonky? Report at bugs.mojang.com"@henrikkniberg on X, June 5, 2020
  9. MC-93320 — "Water freezes even if randomTickSpeed is 0" — resolved as "Fixed".