Gamerule Command Generator

Set world rules such as keeping inventory on death, freezing time, disabling fire spread, or crop growth speed

Commonly used rules

The rule list adjusts automatically based on the edition you choose, since some rules are Java-only or Bedrock-only

Worked examples

The examples below come out of the same generator as the form above, so the commands and explanations always match what the tool produces. Copy one and adjust it from there

1. Keep your items on death

The most commonly enabled rule — items no longer drop on death, which suits a world used for testing commands

/gamerule keepInventory true

What it does Will enable the rule "Keep inventory on death (keepInventory)" for this world.

2. Stop the day/night cycle

Turning this off freezes the clock — pair it with time set to lock the world at midday

/gamerule doDaylightCycle false

What it does Will disable the rule "Day-night cycle continues (doDaylightCycle)" for this world.

3. Change a numeric rule

Some rules take a number rather than on/off — the form swaps the input for you when you pick one

/gamerule randomTickSpeed 10

What it does Will set the rule "Crop growth speed (randomTickSpeed)" to 10.

How this command differs by edition and version

This is the first example above, run through every edition and version this tool supports. Versions that produce the same result share a row

Every version this tool supports produces the same result, so a command you copy works without version-specific edits

Java Edition 1.21.5 and up Java Edition 1.20.5 - 1.21.4 Java Edition 1.13 - 1.20.4 (legacy NBT) Bedrock Edition (stable)
/gamerule keepInventory true

Before you use these