Game rules are per-world switches that control core Minecraft mechanics — whether you keep your items on death, whether the sun moves, how fast crops grow, and dozens of other behaviors. This reference covers every game rule available in Minecraft: Java Edition 26.2, with each rule’s type, default value, and effect. Rules are stored in the world’s level.dat file and apply across all dimensions. You can browse and copy them interactively with our free Minecraft Gamerule Browser.
Important premise correction: many older guides still use camelCase names like keepInventory. That is outdated. In snapshot 25w44a (on the path to 1.21.11, shortly before Mojang moved to year-based versioning) every game rule was moved into a registry and renamed to snake_case resource locations — so keepInventory is now keep_inventory, doDaylightCycle is now advance_time, and so on. The canonical form is a resource location such as minecraft:keep_inventory, where the minecraft: prefix is optional. Old camelCase names are deprecated and may still resolve for backward compatibility in 26.2, but you should not rely on them. To set or read a rule, open the chat window with T (or /, which pre-fills the slash) in single-player with cheats on, or type into your server console. The syntax is /gamerule ; omit the value to query the current setting instead of changing it. This requires permission/op level 2 in Java (level 1 with cheats in Bedrock).
Full Minecraft 26.2 Gamerule List
| Gamerule (26.2) | Type | Default | Old name (pre-25w44a) | Effect |
|---|---|---|---|---|
| keep_inventory | Boolean | false | keepInventory | Players keep items and XP after death. |
| pvp | Boolean | true | pvp | Players can damage each other. |
| drowning_damage | Boolean | true | drowningDamage | Players take drowning damage. |
| fall_damage | Boolean | true | fallDamage | Players take fall damage. |
| fire_damage | Boolean | true | fireDamage | Damage from fire, lava, campfires, magma. |
| freeze_damage | Boolean | true | freezeDamage | Freezing damage from powder snow. |
| natural_health_regeneration | Boolean | true | naturalRegeneration | Health regenerates when hunger is full. |
| immediate_respawn | Boolean | false | doImmediateRespawn | Respawn instantly, skip the death screen. |
| limited_crafting | Boolean | false | doLimitedCrafting | Only unlocked recipes can be crafted. |
| respawn_radius | Integer | 10 | spawnRadius | Block radius around world spawn for respawns. |
| players_sleeping_percentage | Integer | 100 | playersSleepingPercentage | % of players who must sleep to skip night. |
| locator_bar | Boolean (Java) | true | locatorBar | Show the player locator bar. String-typed in Bedrock. |
| spectators_generate_chunks | Boolean | true | spectatorsGenerateChunks | Java-only. Spectators generate new chunks. |
| ender_pearls_vanish_on_death | Boolean | true | enderPearlsVanishOnDeath | Java-only. Thrown pearls removed when thrower dies. |
| elytra_movement_check | Boolean | true | disableElytraMovementCheck (inverted) | Java-only. Anti-cheat speed check during elytra flight. |
| player_movement_check | Boolean | true | disablePlayerMovementCheck (inverted) | Java-only. Player movement anti-cheat check. |
| players_nether_portal_default_delay | Integer | 80 | playersNetherPortalDefaultDelay | Java-only. Ticks in a portal before survival teleport. |
| players_nether_portal_creative_delay | Integer | 0 | playersNetherPortalCreativeDelay | Java-only. Ticks in a portal before creative teleport. |
| allow_entering_nether_using_portals | Boolean | true | — | Java-only. Whether portals take players to the Nether. |
| fire_spread_radius_around_player | Integer | 128 | — | Java-only. Radius fire spreads around players; -1 = unlimited. |
| mob_griefing | Boolean | true | mobGriefing | Mobs can change blocks and use items. |
| forgive_dead_players | Boolean | true | forgiveDeadPlayers | Java-only. Angered mobs calm when the player dies. |
| universal_anger | Boolean | false | universalAnger | Java-only. Angered mobs attack any nearby player. |
| max_entity_cramming | Integer | 24 | maxEntityCramming | Java-only. Entities pushing one entity before cramming damage; 0 disables. |
| raids | Boolean | true | disableRaids (inverted) | Java-only. Whether raids can occur. |
| spawn_mobs | Boolean | true | doMobSpawning | Mobs spawn naturally. |
| spawn_monsters | Boolean | true | — | Java-only. Hostile monsters spawn naturally. |
| spawn_phantoms | Boolean | true | doInsomnia | Phantoms spawn for sleepless players at night. |
| spawn_patrols | Boolean | true | doPatrolSpawning | Java-only. Pillager patrols spawn. |
| spawn_wandering_traders | Boolean | true | doTraderSpawning | Java-only. Wandering traders spawn. |
| spawn_wardens | Boolean | true | doWardenSpawning | Java-only. Wardens spawn from sculk shriekers. |
| spawner_blocks_work | Boolean | true | spawnerBlocksEnabled | Java-only. Monster spawner blocks function. |
| block_drops | Boolean | true | doTileDrops | Broken blocks drop items. |
| mob_drops | Boolean | true | doMobLoot | Mobs drop items and XP orbs. |
| entity_drops | Boolean | true | doEntityDrops | Non-mob entities drop items when destroyed. |
| block_explosion_drop_decay | Boolean | true | blockExplosionDropDecay | Java-only. Some blocks lost near a block-explosion center. |
| mob_explosion_drop_decay | Boolean | true | mobExplosionDropDecay | Java-only. Some blocks lost near a mob-explosion center. |
| tnt_explosion_drop_decay | Boolean | false | tntExplosionDropDecay | Some blocks lost near a TNT-explosion center. |
| projectiles_can_break_blocks | Boolean | true | projectilesCanBreakBlocks | Projectiles can destroy breakable blocks (pots, targets). |
| tnt_explodes | Boolean | true | — | Primed TNT actually explodes. |
| advance_time | Boolean | true | doDaylightCycle | Daylight cycle and moon phases progress. |
| advance_weather | Boolean | true | doWeatherCycle | Weather changes naturally. |
| random_tick_speed | Integer | 3 | randomTickSpeed | Random ticks per section: crop growth, decay, fire, ice; 0 stops. |
| spread_vines | Boolean | true | doVinesSpread | Java-only. Vines spread to nearby blocks. |
| water_source_conversion | Boolean | true | waterSourceConversion | Java-only. Water forms new source blocks. |
| lava_source_conversion | Boolean | false | lavaSourceConversion | Java-only. Lava forms new source blocks. |
| max_snow_accumulation_height | Integer | 1 | snowAccumulationHeight | Java-only. Max snow layers (1-8) during snowfall. |
| command_block_output | Boolean | true | commandBlockOutput | Command blocks notify admins when they run. |
| send_command_feedback | Boolean | true | sendCommandFeedback | Player command results show in chat. |
| show_death_messages | Boolean | true | showDeathMessages | Death messages appear in chat. |
| show_advancement_messages | Boolean | true | announceAdvancements | Java-only. Advancements announced in chat. |
| log_admin_commands | Boolean | true | logAdminCommands | Java-only. Op command usage logged and broadcast to ops. |
| command_blocks_work | Boolean | true | commandBlocksEnabled | Command blocks execute in-game. |
| reduced_debug_info | Boolean | false | reducedDebugInfo | Java-only. F3 debug screen hides coordinates etc. |
| global_sound_events | Boolean | true | — | Java-only. Global sounds (wither, dragon death) heard everywhere. |
| max_block_modifications | Integer | 32768 | commandModificationBlockLimit | Java-only. Block limit per /clone, /fill, /setblock op. |
| max_command_sequence_length | Integer | 65536 | maxCommandChainLength | Max commands in one chain/tick (chains, functions). |
| max_command_forks | Integer | 65536 | maxCommandForkCount | Java-only. Max execute-branch contexts per command. |
| max_minecart_speed | Integer | 8 | minecartMaxSpeed | Java-only, experimental. Max minecart speed (blocks/sec). |
Player and Combat Rules
The most-changed rule is keep_inventory. Setting /gamerule keep_inventory true means you no longer lose items or XP on death — the go-to change for hardcore builders and multiplayer friends. See our dedicated Keep Inventory guide for the full walkthrough. To make a peaceful or creative-style world, disable the damage rules: /gamerule fall_damage false, /gamerule fire_damage false, /gamerule drowning_damage false, and /gamerule freeze_damage false. Turn off natural healing for a survival challenge with /gamerule natural_health_regeneration false, or skip the death screen entirely using /gamerule immediate_respawn true. On multiplayer, /gamerule pvp false stops players hurting each other.
Mobs, Spawning, and Drops
/gamerule mob_griefing false stops creepers, endermen, and ghasts from altering blocks — useful for protecting builds. Tired of phantoms? Run /gamerule spawn_phantoms false. To freeze all natural spawning (spawners and commands still work), use /gamerule spawn_mobs false. Java adds fine-grained spawn toggles like spawn_patrols, spawn_wandering_traders, and spawn_wardens. For crowd control in mob farms, /gamerule max_entity_cramming 0 disables cramming damage. Note the inverted rules: raids replaces the old disableRaids, so /gamerule raids false now disables raids — the literal value is the opposite of the old rule. On the drops side, /gamerule mob_drops false stops loot and XP from mobs, while /gamerule block_drops false stops blocks dropping items.
World, Time, and Growth Rules
Freeze the sun in place with /gamerule advance_time false, and stop rain and thunder with /gamerule advance_weather false. The single most powerful world rule is random_tick_speed: it governs crop growth, leaf decay, fire spread, and ice/snow. The default is 3; /gamerule random_tick_speed 100 makes farms grow almost instantly, while 0 stops random ticks entirely. For sleep mechanics on a busy server, /gamerule players_sleeping_percentage 50 lets half the players skip the night instead of everyone. Command-block and datapack builders lean on the integer limits — for example /gamerule max_command_sequence_length 100000 and /gamerule max_block_modifications 65536.
How to Run These
- In chat: Press T (or /) to open chat with cheats enabled, then type the command, e.g.
/gamerule keep_inventory true. Leaving off the value —/gamerule mob_griefing— prints the current value instead of changing it. Names tab-complete as you type. - In a command block: Place a command block (requires
command_blocks_workto be true), then enter the same command without needing to be op. Handy for map mechanics and toggles. - Server console: On a dedicated server, type the command without the leading slash directly into the console. This runs at full permission level. If you host with us, you can enter it in the panel console on your Minecraft server hosting dashboard.
- Creation menu: In 26.2 you can also set rules in the world’s “Edit Game Rules” screen, organized into Player, Mobs, Spawning, Drops, World updates, Chat, and Miscellaneous categories.
Java vs Bedrock
Java Edition uses snake_case registry IDs (optionally prefixed minecraft:), while Bedrock Edition uses all-lowercase names with no separators — for example keepinventory, mobgriefing, dodaylightcycle, and commandblockoutput. Many rules in the table above are Java-exclusive, including show_advancement_messages, log_admin_commands, global_sound_events, max_block_modifications, reduced_debug_info, forgive_dead_players, universal_anger, raids, the spawn toggles (spawn_monsters, spawn_patrols, spawn_wandering_traders, spawn_wardens), the movement checks, and the source-conversion rules. Bedrock has its own exclusives that Java lacks, such as dofiretick, functioncommandlimit, recipesunlock, respawnblocksexplode, showcoordinates, and showdaysplayed. One rule, locator_bar, exists in both editions but is a boolean in Java and a string type in Bedrock.
Frequently Asked Questions
Why doesn’t keepInventory work anymore?
In snapshot 25w44a every rule was renamed to snake_case, so the current name is keep_inventory. The old camelCase names are deprecated and may still resolve for backward compatibility, but you should use /gamerule keep_inventory true.
How do I check a rule’s current value?
Run the command with no value. For example /gamerule mob_griefing prints the current setting rather than changing it.
Do game rules apply to every dimension?
Yes. Game rules are stored per-world in level.dat and apply to the Overworld, Nether, and End together — there is no per-dimension override.
What permission level do I need?
In Java Edition /gamerule requires op/permission level 2. In Bedrock you need op level 1 with cheats enabled. Command blocks can run it regardless of your own op status.
Why did raids behave the opposite of what I expected?
Three rules changed meaning, not just name, in 25w44a: disableRaids became raids, disableElytraMovementCheck became elytra_movement_check, and disablePlayerMovementCheck became player_movement_check. Setting the new rule to the same literal value as the old one produces the opposite behavior, so /gamerule raids false disables raids.
Where can I explore rules and related commands?
Use the interactive Minecraft Gamerule Browser to filter and copy rules, or read our companion guides: the gamerules list, the full Minecraft commands list, target selectors, teleport commands, the give command, summon command, item IDs, and the enchantments hub.
Ready to play?
Run your own Minecraft server with XGamingServer
Spin up an always-on Minecraft server your friends can join in minutes — no port-forwarding, no tech headaches.







