Gamerules allow changing specific things on servers like the day/night cycle, creepers exploding, mobs dropping items when they die, or even keeping a player's inventory upon death.
PreparationThe first step to using Gamerules is to make sure your account has been made a server operator.
Next, log into your Minecraft server.
Gamerule commands are as shown below:
Use CTRL + F to find specific gamerules.
Gamerules ListannounceAdvancements - Whether advancements should be announced in chat
commandBlocksEnabled - Whether command blocks should be enabled in-game
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
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.
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"
doDaylightCycle - Whether the day-night cycle and moon phases progress
doEntityDrops - Whether entities that are not mobs should have drops
disableRaids - Whether raids are disabled or not
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
universalAnger - Makes angered neutral mobs attack any nearby player, not just the player that angered them. Works best if you disable forgiveDeadPlayers.
doMobSpawning - Whether mobs should naturally spawn
doPatrolSpawning - Whether patrols can spawn
doTileDrops - Whether blocks 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.
doLimitedCrafting - Whether players should only be able to craft recipes that they've unlocked first
showCoordinates - Whether the player's coordinates are displayed
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
tntExplodes - Whether TNT will explode or not after activation
doMobLoot - Whether mobs should drop items
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.)
pvp - Whether the player can fight with other players
Congratulations! You now know How to Use Game Rules in Minecraft.
FAQ
Yes, you sure can! You can control this feature by using gamerules in Minecraft. You would need to use mobGriefing gamerule to toggle creepers exploding.
No more crying over lost items! The keepInventory gamerule lets you keep your things safe even when you die in your Minecraft game.
Definitely, but only if you want them to! The doMobLoot gamerule decides whether mobs drop items when they die.
The Minecraft world can be made to mimic the real world! The doDaylightCycle gamerule helps you control the day-night cycle and moon phases in your game.
Absolutely you can! If mobs are ruining your peaceful gameplay, use the doMobSpawning gamerule to put a stop to it.
Yes, indeed! The doWeatherCycle gamerule allows you to control whether the weather in your Minecraft world will change or remain constant.
You've got some choices to figure out such as falling or catching fire using drowningDamage, fallDamage and fireDamage gamerules respectively.
That's possible! A player can spawn in a given radius out from the world spawn coordinates when they first enter the game or when they die without a spawn point with the spawnRadius gamerule.
Oh yes, you can! The doFireTick is another exciting gamerule. It's your magic wand! Do you want fire to spread within your game? Or maybe you want it to go out on its own, naturally? The power is in your hands
Of course! The naturalRegeneration gamerule is what you need to use if you'd like the player to regenerate health naturally. Still, there are some things these gamerules won't change. I'm talking about external healing. Do you remember golden apples? Or the Regeneration effect? They still work as normal.
Summary:
- Make sure you have been set as the server operator
- Log into the game
- Enter Gamerule commands in chat