Skip to main content

Gamerules

Minecraft's built-in game rules can be set via the <gamerules> module. Not all gamerules are fully supported, the table below lists which are supported.

ElementDescription
<gamerules> </gamerules>Node containing the defined game rules.

Supported Gamerule Sub-elements

ElementDescriptionValue
<doFireTick>Toggles whether fire spread occurs.true/false
<doTileDrops>Toggles whether tile entities drop.true/false
<doMobLoot>Toggles whether mobs drop loot on death.true/false
<locatorBar>Toggles whether the locator bar should be enabled.
Note: This is available in Minecraft 1.21.6 and later.
true/false
<mobGriefing>Toggles whether mobs such as Creepers and Endermen cause enviromental damage.true/false
<randomTickSpeed>Sets how often random block ticks occur, such as leaf decay, vegetation growth, fire spreading, and more.Integer
<naturalRegeneration>Toggles whether or not players naturally regain heath.true/false
<doDaylightCycle>Toggles whether or not time tick occurs.true/false
info

When stopping the daylight cycle, you should either use the <doDaylightCycle> gamerule or the <timelock> module.

Additional Gamerule Sub-elements

RuleDescription
<commandBlockOutput>Command blocks should not be used with PGM.
<logAdminCommands>Not useful in custom maps.
<reducedDebugInfo>Not useful in custom maps.
<sendCommandFeedback>Not useful in custom maps.

Unsupported Gamerules

RuleDescription
<doMobSpawning>Not supported in favor of the Mob Spawning module.
<showDeathMessages>Not supported since PGM handles death messages.
<doImmediateRespawn>Not supported in favor of the Respawn module.
<keepInventory>Partially supported. Use the Item Keep module instead.
Some maps use this to prevent item drops on death without adding them to Item Remove.

Examples

<gamerules>
<doDaylightCycle>false</doDaylightCycle>
<naturalRegeneration>false</naturalRegeneration>
</gamerules>