Class GameRules
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DefaultedRegistryReference<GameRule<Boolean>>If advancements should be announced to the server.static final DefaultedRegistryReference<GameRule<Boolean>>WhetherCommandBlocks should notify admins when they perform commands.static final DefaultedRegistryReference<GameRule<Boolean>>Whether the server should skip checking player speed when the player is wearing elytra.static final DefaultedRegistryReference<GameRule<Boolean>>WhetherRaids are disabled.static final DefaultedRegistryReference<GameRule<Boolean>>Whether the day-night cycle and moon phases progress.static final DefaultedRegistryReference<GameRule<Boolean>>Whether entities that are not mobs should have drops.static final DefaultedRegistryReference<GameRule<Boolean>>Whether fire should spread and naturally extinguish.static final DefaultedRegistryReference<GameRule<Boolean>>WhetherPlayers should respawn immediately without showing the death screen.static final DefaultedRegistryReference<GameRule<Boolean>>WhetherPhantoms can spawn in the night-time.static final DefaultedRegistryReference<GameRule<Boolean>>WhetherPlayers can only craft recipes they have unlocked.static final DefaultedRegistryReference<GameRule<Boolean>>WhetherAgents should drop items.static final DefaultedRegistryReference<GameRule<Boolean>>WhetherAgents should naturally spawn.static final DefaultedRegistryReference<GameRule<Boolean>>Whetherpatrollerswill go out on patrol (typically in aRaid.static final DefaultedRegistryReference<GameRule<Boolean>>Whether blocks should have drops.static final DefaultedRegistryReference<GameRule<Boolean>>Whethertraderswill naturally spawn.static final DefaultedRegistryReference<GameRule<Boolean>>Whether the weather will change.static final DefaultedRegistryReference<GameRule<Boolean>>Whether entities should take drowning damage.static final DefaultedRegistryReference<GameRule<Boolean>>Whether entities should take fall damage.static final DefaultedRegistryReference<GameRule<Boolean>>Whether entities should take fire damage.static final DefaultedRegistryReference<GameRule<Boolean>>Makes angered neutral mobs stop being angry when the targeted player dies nearby.static final DefaultedRegistryReference<GameRule<Boolean>>Whether entities should take freeze damage.static final DefaultedRegistryReference<GameRule<Boolean>>WhetherPlayers should keep items in their inventory after death.static final DefaultedRegistryReference<GameRule<Boolean>>Whether to log admin commands to server log.static final DefaultedRegistryReference<GameRule<Integer>>The total number ofchain command blocksthat can run during a single tick.static final DefaultedRegistryReference<GameRule<Integer>>The maximum number of other pushable entities a mob or player can push, before taking 3 suffocation damage per half-second.static final DefaultedRegistryReference<GameRule<Boolean>>static final DefaultedRegistryReference<GameRule<Boolean>>WhetherPlayers can regenerate health naturally if their hunger is full enough (doesn't affect external healing, such as golden apples, the Regeneration effect, etc.).static final DefaultedRegistryReference<GameRule<Integer>>What percentage of players must sleep to skip the night.static final DefaultedRegistryReference<GameRule<Integer>>How often a random block tick occurs (such as plant growth, leaf decay, etc.) per chunk section per game tick.static final DefaultedRegistryReference<GameRule<Boolean>>Whether the debug screen shows all or reduced information.static final DefaultedRegistryReference<GameRule<Boolean>>Whether the feedback from commands executed by aPlayershould show up in chat.static final DefaultedRegistryReference<GameRule<Boolean>>Whether a message appears in chat when aPlayerdies.static final DefaultedRegistryReference<GameRule<Integer>>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 spawn point.static final DefaultedRegistryReference<GameRule<Boolean>>Whether players inspectator modecan generate chunks.static final DefaultedRegistryReference<GameRule<Boolean>>Makes angered neutral mobs attack any nearby player, not just the player that angered them. -
Method Summary
-
Field Details
-
ANNOUNCE_ADVANCEMENTS
If advancements should be announced to the server.This is a boolean game rule, with a default value of
true. -
COMMAND_BLOCK_OUTPUT
WhetherCommandBlocks should notify admins when they perform commands.This is a boolean game rule, with a default value of
true. -
DISABLE_ELYTRA_MOVEMENT_CHECK
Whether the server should skip checking player speed when the player is wearing elytra.This is a boolean game rule, with a default value of
false. -
DISABLE_RAIDS
-
DO_DAYLIGHT_CYCLE
Whether the day-night cycle and moon phases progress.This is a boolean game rule, with a default value of
true. -
DO_ENTITY_DROPS
Whether entities that are not mobs should have drops.This is a boolean game rule, with a default value of
true. -
DO_FIRE_TICK
Whether fire should spread and naturally extinguish.This is a boolean game rule, with a default value of
true. -
DO_INSOMNIA
WhetherPhantoms can spawn in the night-time.This is a boolean game rule, with a default value of
true. -
DO_IMMEDIATE_RESPAWN
WhetherPlayers should respawn immediately without showing the death screen.This is a boolean game rule, with a default value of
true. -
DO_LIMITED_CRAFTING
WhetherPlayers can only craft recipes they have unlocked.This is a boolean game rule, with a default value of
false. -
DO_MOB_LOOT
WhetherAgents should drop items.This is a boolean game rule, with a default value of
true. -
DO_MOB_SPAWNING
WhetherAgents should naturally spawn.This is a boolean game rule, with a default value of
true. -
DO_PATROL_SPAWNING
Whetherpatrollerswill go out on patrol (typically in aRaid.This is a boolean game rule, with a default value of
true. -
DO_TILE_DROPS
Whether blocks should have drops.This is a boolean game rule, with a default value of
true. -
DO_TRADER_SPAWNING
Whethertraderswill naturally spawn.This is a boolean game rule, with a default value of
true. -
DO_WEATHER_CYCLE
Whether the weather will change.This is a boolean game rule, with a default value of
true. -
DROWNING_DAMAGE
Whether entities should take drowning damage.This is a boolean game rule, with a default value of
true. -
FALL_DAMAGE
Whether entities should take fall damage.This is a boolean game rule, with a default value of
true. -
FIRE_DAMAGE
Whether entities should take fire damage.This is a boolean game rule, with a default value of
true. -
FORGIVE_DEAD_PLAYERS
Makes angered neutral mobs stop being angry when the targeted player dies nearby.This is a boolean game rule, with a default value of
true. -
FREEZE_DAMAGE
Whether entities should take freeze damage.This is a boolean game rule, with a default value of
true. -
KEEP_INVENTORY
WhetherPlayers should keep items in their inventory after death.This is a boolean game rule, with a default value of
false. -
LOG_ADMIN_COMMANDS
Whether to log admin commands to server log.This is a boolean game rule, with a default value of
true. -
MAX_COMMAND_CHAIN_LENGTH
The total number ofchain command blocksthat can run during a single tick.This is a numerical game rule, with a default value of
65536. -
MAX_ENTITY_CRAMMING
The maximum number of other pushable entities a mob or player can push, before taking 3 suffocation damage per half-second.Damage affects
survival modeoradventure modePlayers, and all mobs but bats. Pushable entities include non-spectator-modePlayer, any mob exceptBats, as well asBoats andMinecartLike.Setting to
0disables the rule.This is a numerical game rule, with a default value of
24. -
MOB_GRIEFING
WhetherAgents should be able to change blocks, and whetherAgents can pick up items.In vanilla Minecraft, the following entities can change blocks when this game rule is
true:In vanilla Minecraft, the following entities can pick up items when this game rule is
true:This is a boolean game rule, with a default value of
true. -
NATURAL_REGENERATION
WhetherPlayers can regenerate health naturally if their hunger is full enough (doesn't affect external healing, such as golden apples, the Regeneration effect, etc.).This is a boolean game rule, with a default value of
true. -
PLAYERS_SLEEPING_PERCENTAGE
What percentage of players must sleep to skip the night.This is a numerical game rule, with a default value of
100. -
RANDOM_TICK_SPEED
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
This is a numerical game rule, with a default value of
3. -
REDUCED_DEBUG_INFO
Whether the debug screen shows all or reduced information.This is a boolean game rule, with a default value of
false. -
SEND_COMMAND_FEEDBACK
Whether the feedback from commands executed by aPlayershould show up in chat.This game rule affects the default behavior of whether
CommandBlocks store their output text.This is a boolean game rule, with a default value of
true. -
SHOW_DEATH_MESSAGES
Whether a message appears in chat when aPlayerdies.This is a boolean game rule, with a default value of
true. -
SPAWN_RADIUS
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 spawn point.This is a numerical game rule, with a default value of
10. -
SPECTATORS_GENERATE_CHUNKS
Whether players inspectator modecan generate chunks.This is a boolean game rule, with a default value of
true. -
UNIVERSAL_ANGER
Makes angered neutral mobs attack any nearby player, not just the player that angered them.This is a boolean game rule, with a default value of
false.
-
-
Method Details
-
registry
-