Configuring and managing your server
Minecraft Gamerules List
One of the features that makes Minecraft so versatile and customizable is the use of GameRules, which are essentially a set of configurable options that can be used to modify various aspects of the game. In this article, we'll take a closer look at what GameRules are, how they work, and how to use them to customize your Minecraft experience.
What Are GameRules?
GameRules are a set of options that can be used to modify the gameplay experience in Minecraft. They are stored as key-value pairs in the game's code, and can be accessed and changed using various commands or mods. Some GameRules are related to game mechanics, while others are related to specific features or game modes.
GameRules are incredibly versatile and can be used to modify many different aspects of the game. Some common uses for GameRules include:
- Changing the difficulty level of the game
- Disabling certain features, such as hunger or fall damage
- Setting the time of day or weather
- Modifying the behavior of mobs or other entities
How Do GameRules Work?
GameRules are stored as key-value pairs in the game's code, which means that each GameRule has a name and a corresponding value. For example, the GameRule that controls whether players can keep their inventory when they die is called "keepInventory", and its value can be set to "true" or "false" depending on whether you want to enable or disable the feature.
GameRules can be modified using commands in the game console or chat window.
How to Use GameRules in Minecraft
To use GameRules in Minecraft, you'll need to first access the game console or chat window. From there, you can use various commands to view and modify the current GameRules. Here are some of the most common commands for working with GameRules:
/gamerule <rule> <value>: Sets the value of the specified GameRule. Replace <rule> with the name of the GameRule you want to modify, and <value> with the new value you want to set.
/gamerule <rule>: Displays the current value of the specified GameRule.
/gamerule: Lists all available GameRules and their current values.
Exemples
Here are a few examples of how you might use GameRules to customize your Minecraft experience:
To prevent mob from altering the terrain in any way, use the command /gamerule mobGriefing
To disable fall damage, use the command /gamerule fallDamage false
To enable cheats in a singleplayer world, use the command /gamerule allowCheats true
To disable natural regeneration of health, use the command /gamerule naturalRegeneration false
To set the maximum distance players can travel from the world spawn point, use the command /gamerule maxWorldSize <value>. Replace <value> with the maximum radius in blocks, so for example, /gamerule maxWorldSize 5000 would set the maximum world size to a radius of 5000 blocks.
To enable or disable mob spawning, use the command /gamerule doMobSpawning <true/false>
To set the maximum number of command block output lines that can be displayed, use the command /gamerule maxCommandChainLength <value>. Replace <value> with the maximum number of lines of command block output you want to allow.
To allow or prevent TNT explosions from damaging blocks, use the command /gamerule tntExplodes <true/false>
Note that not all GameRules are available in all versions of Minecraft, and some GameRules may have different names or syntax depending on the version you're playing.
Complete Java Minecraft GameRules list
announceAdvancements | Whether advancements should be announced in chat |
commandBlockOutput | Whether command blocks should notify admins when they perform commands |
disableElytraMovementCheck | Whether the server should skip checking player speed when the player is wearing elytra |
disableRaids | Whether raids are disabled or not |
doDaylightCycle | Whether the day-night cycle and moon phases progress |
doEntityDrops | Whether entities that are not mobs should have drops |
doFireTick | Whether fire should spread and naturally extinguish |
doInsomnia | Whether phantoms can spawn in the nightmare |
doImmediateRespawn | Players respawn immediately without showing the death screen. (Bedrock: immediateRespawn) |
doLimitedCrafting | Whether players should only be able to craft recipes that they've unlocked first |
doMobLoot | Whether mobs should drop items |
doMobSpawning | Whether mobs should naturally spawn |
doPatrolSpawning | Whether patrols can spawn |
doTileDrops | Whether blocks should have drops |
doTraderSpawning | Whether wandering traders can spawn |
doWeatherCycle | Whether the weather will change |
drowningDamage | Whether the player should take damage when drowning |
fallDamage | Whether the player should take fall damage |
fireDamage | Whether the player should take fire damage |
forgiveDeadPlayers | Makes angered neutral mobs stop being angry when the targeted player dies nearby. |
freezeDamage | Whether the player should take damage when inside powder snow |
keepInventory | Whether the player should keep items in their inventory after death |
logAdminCommands | Whether to log admin commands to server log |
maxCommandChainLength | Determines the number at which the chain command block acts as a "chain" |
maxEntityCramming | The maximum number of pushable entities another entity can try to push, before taking suffocation damage. Setting to 0 disables the rule. Affects players and mobs only (excluding bats) |
mobGriefing | Whether creepers, zombies, endermen, ghasts, withers, ender dragons, rabbits, sheep, and villagers should be able to change blocks and whether villagers, zombies, skeletons, and zombie pigmen can pick up items |
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.) |
playersSleepingPercentage | What percentage of players must sleep to skip the night. |
randomTickSpeed | How often a random block tick occurs (such as plant growth, leaf decay, etc.) per chunk section per game tick. 0 will disable random ticks, higher numbers will increase random ticks |
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 |
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 |
showDeathMessages | Whether a message appears in chat when a player dies |
spawnRadius | The number of blocks outward from the world spawn coordinates that a player will spawn in when first joining a server or when dying without a spawnpoint |
spectatorsGenerateChunks | Whether players in spectator mode can generate chunks |
universalAnger | Makes angered neutral mobs attack any nearby player, not just the player that angered them. Works best if you disable forgiveDeadPlayers. |
Conclusion
GameRules are a powerful and versatile tool for customizing your Minecraft experience. Whether you're looking to tweak the game mechanics, disable certain features, or just experiment with new gameplay modes, GameRules can help you achieve your goals. With a little bit of experimentation and some basic knowledge of the available commands, you can unlock a whole new level of customization and creativity in Minecraft.