Game rules are a set of customizable options for a specific in-game world.
Modifying game rules[]
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[]
The following is a list of game rules available in-game, their allowed values, and their availability in Java Edition and Bedrock Edition.
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 |
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 [upcoming: JE 1.21.2]
|
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 order to travel through dimensions through the nether portal. | 1
|
Int | Yes | No |
playersNetherPortalDefaultDelay
|
Control how many ticks the player in Survival or Adventure mode has to wait in order to travel through dimensions through the nether portal. | 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 effects are shown. | 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 | No |
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[]
This section explains more complex behaviors of certain gamerules.
disableRaids
- When
true
, the Bad Omen effect is not removed from a player when entering a village. - Stops a raid if set to
true
while a raid is in progress, but the existing raid mobs do not despawn.
- When
doEntityDrops
- When
false
, items cannot be removed from item frames.[needs testing]
- When
doMobLoot
doMobSpawning
- Affects only natural mob spawning. Mobs from structures,[Java Edition only] monster spawners, and events still spawn when set to
false
.
- Affects only natural mob spawning. Mobs from structures,[Java Edition only] monster spawners, and events still spawn when set to
doTileDrops
- When
false
, containers still drop their contents, but not themselves.- Shulker boxes do not drop anything, causing the items in them to be lost.
- When
false
, destroying an armor stand does not drop it nor any armor it had equipped. - When
false
, item frames still drop themselves and their items. - When
false
, infested blocks do not spawn silverfish when broken.
- When
drowningDamage
- When
false
, the player still loses air, but does not take damage when the air is depleted.
- When
fireDamage
- When
false
, the player may still be set on fire, but does not take damage when on fire.
- When
forgiveDeadPlayers
- Every neutral mob that can be aggravated remain aggravated even after the offending player dies, with the exception of piglins when a player does not wear golden armor and iron golems when it is created from a village where the player is unpopular.
keepInventory
- When
true
, players also retain their experience upon death. - When
true
, health and hunger are still reset as normal upon death. - When
true
, all effects are still removed upon death.[3] - When
true
, items enchanted with Curse of Vanishing do not disappear upon death.[4]
- When
mobGriefing
- When
false
, prevents all mobs from modifying the environment in any way. This includes trampling crops and turtle eggs, picking up items, destroying blocks, or moving blocks. Specifically, it prevents:- Allays from picking up dropped items.
- Blazes from creating fire or lighting campfires.
- Creepers from destroying blocks when they explode, although they still damage entities.
- End crystals from destroying blocks when they explode, although they still damage entities.
- The ender dragon from destroying blocks, causing it to just fly through them instead.
- Endermen from picking up or placing blocks.
- Evoker from turning blue sheep red.
- Foxes from picking sweet berries from a sweet berry bush.
- Ghast fireballs from exploding blocks and creating fire. They still damage entities.
- Piglins from attempting to barter by picking up dropped items; using the item on them still works.
- Rabbits from eating carrot crops.
- Ravagers from destroying crops and leaves.
- Sheep from turning grass blocks into dirt, but does not prevent the regrowth of wool. They still act as if they are eating the grass and regrow their wool upon doing so, but the grass remains and the grass breaking sound does not play.
- Silverfish from hiding in infested blocks and destroying those blocks when hatching.
- Snow golems from creating snow trails.
- Villagers from farming and picking up items. However, they can still open doors and throw items.
- The wither and its heads from destroying blocks with their explosions. Entities are still damaged, and a wither rose drops as an item.
- Zombies from breaking doors and attacking turtle eggs.
- Has no effect on the player.
- When
playersSleepingPercentage
- When set to
0
, at least one player is still required to sleep to skip the night. - When set to a number greater than
100
, night is not skipped no matter how many players are sleeping.
- When set to
randomTickSpeed
- Does not affect:
- Cauldrons filling with water or powder snow while raining or snowing.[5]
- Still affects filling of water and lava in cauldrons below pointed dripstone.
- Death of coral blocks, coral, and coral fan.
- Hatching of frogspawn[6] and sniffer eggs[7].
- Cauldrons filling with water or powder snow while raining or snowing.[5]
- Does not affect:
snowAccumulationHeight
- When set to
0
, snow layers do not form at all. - When set to
8
or higher, snow forms up to the level of a full block, but no greater than that.
- When set to
universalAnger
- Every neutral mob that can be aggravated targets all nearby players whenever they are aggravated.
- Bees attack all nearby players when their beehive is broken, regardless of the setting of this gamerule.[8]
- Bees becoming angry when attacked works as expected.
History[]
Java Edition | |||||
---|---|---|---|---|---|
1.4.2 | 12w32a | Added /gamerule . | |||
Added the following gamerules:
| |||||
12w38a | Added game rule commandBlockOutput . | ||||
1.6.1 | 13w23a | Added game rule naturalRegeneration . | |||
13w24a | Added game rule doDaylightCycle . | ||||
1.8 | 14w03a | Added game rule logAdminCommands . | |||
14w10a | Added game rule showDeathMessages . | ||||
14w17a | Added game rule randomTickSpeed . | ||||
14w26a | Added game rule sendCommandFeedback . | ||||
14w29a | Added game rule reducedDebugInfo .
| ||||
Added the ability to create dummy game rules. | |||||
1.8.1 | pre1 | Added game rule doEntityDrops .
| |||
Game rule doTileDrops no longer affects entities. | |||||
1.9 | 15w37a | Added game rule spectatorsGenerateChunks . | |||
15w51a | Added game rule spawnRadius . | ||||
16w07a | Added game rule disableElytraMovementCheck . | ||||
1.11 | 16w38a | Added game rule doWeatherCycle .
| |||
Added game rule maxEntityCramming . | |||||
1.12 | 17w13a | Added game rule doLimitedCrafting . | |||
17w16b | Added game rule maxCommandChainLength . | ||||
17w18a | Added game rule announceAdvancements . | ||||
pre1 | Added game rule gameLoopFunction . | ||||
1.13 | 17w45a | Removed the ability to create custom game rules. | |||
17w49b | Removed game rule gameLoopFunction . | ||||
1.14.3 | pre3 | Added game rule disableRaids . | |||
1.15 | 19w36a | Added game rule doInsomnia .
| |||
Added game rule doImmediateRespawn . | |||||
Added game rule drowningDamage . | |||||
Added game rule fallDamage . | |||||
Added game rule fireDamage . | |||||
1.15.2 | pre1 | Added game rule doPatrolSpawning .
| |||
Added game rule doTraderSpawning . | |||||
1.16 | 20w17a | Game rules can now be changed upon world creation. | |||
pre1 | Added game rule universalAnger .
| ||||
Added game rule forgiveDeadPlayers . | |||||
1.17 | 20w48a | Added game rule freezeDamage . | |||
20w51a | Added game rule playersSleepingPercentage . | ||||
1.19 | 22w16a | Added game rule doWardenSpawning . | |||
1.19.3 | 22w44a | Added the following game rules:
| |||
1.19.4 | 23w03a | Added game rule commandModificationBlockLimit . | |||
23w06a | Added game rule doVinesSpread . | ||||
1.20.2 | 23w31a | The randomTickSpeed game rule now affects the formation of snow and ice.[9] | |||
pre1 | Added game rule enderPearlsVanishOnDeath . | ||||
Pocket Edition | |||||
1.0.5 | alpha 1.0.5.0 | Added /gamerule .
| |||
Added game rule drowningDamage . | |||||
Added game rule fallDamage . | |||||
Added game rule fireDamage . | |||||
Added game rule pvp . | |||||
1.1.0 | alpha 1.1.0.0 | Added 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.0 | beta 1.6.0.6 | Added game rule doInsomnia . | |||
1.7.0 | beta 1.7.0.2 | Added game rule commandBlocksEnabled . | |||
1.8.0 | beta 1.8.0.8 | Added game rule randomTickSpeed . | |||
1.9.0 | beta 1.9.0.0 | Added game rule showDeathMessages .
| |||
Added game rule immediateRespawn . | |||||
Added game rule functioncommandlimit . | |||||
1.12.0 | beta 1.12.0.2 | Added 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.0 | Added game rule showTags . | ||||
? | Removed the ability to create dummy gamerules. | ||||
1.16.210 | beta 1.16.210.53 | Added game rule freezeDamage . | |||
1.17.30 | beta 1.17.20.20 | Added game rule respawnBlocksExplode . | |||
? | Added game rule showBorderEffect . | ||||
1.20.30 | beta 1.20.20.21 | Added game rule playersSleepingPercentage .
| |||
Added game rule recipesUnlock . | |||||
beta 1.20.30.20 | Added game rule doLimitedCrafting . | ||||
beta 1.20.30.22 | The recipesUnlock game rule is now set to true by default. | ||||
Upcoming Bedrock Edition | |||||
1.20.40 | beta 1.20.40.22 | The spawnRadius game rule is now set to 10 by default to match Java Edition. |
Gallery[]
References[]
- ↑ MC-154922
- ↑ MCPE-73842
- ↑ MC-67352 — resolved as "Works As Intended".
- ↑ MC-108353 — resolved as "Works As Intended".
- ↑ MC-93820 — Rain filling cauldrons is not affected by randomTickSpeed
- ↑ MC-249308
- ↑ MC-261250 — resolved as "Invalid".
- ↑ "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
- ↑ MC-93320 — "Water freezes even if randomTickSpeed is 0" — resolved as "Fixed".