Class GameRules
- 
Field SummaryFieldsModifier 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_ADVANCEMENTSIf advancements should be announced to the server.This is a boolean game rule, with a default value of true.
- 
COMMAND_BLOCK_OUTPUTWhetherCommandBlocks should notify admins when they perform commands.This is a boolean game rule, with a default value of true.
- 
DISABLE_ELYTRA_MOVEMENT_CHECKWhether 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_CYCLEWhether the day-night cycle and moon phases progress.This is a boolean game rule, with a default value of true.
- 
DO_ENTITY_DROPSWhether entities that are not mobs should have drops.This is a boolean game rule, with a default value of true.
- 
DO_FIRE_TICKWhether fire should spread and naturally extinguish.This is a boolean game rule, with a default value of true.
- 
DO_INSOMNIAWhetherPhantoms can spawn in the night-time.This is a boolean game rule, with a default value of true.
- 
DO_IMMEDIATE_RESPAWNWhetherPlayers should respawn immediately without showing the death screen.This is a boolean game rule, with a default value of true.
- 
DO_LIMITED_CRAFTINGWhetherPlayers can only craft recipes they have unlocked.This is a boolean game rule, with a default value of false.
- 
DO_MOB_LOOTWhetherAgents should drop items.This is a boolean game rule, with a default value of true.
- 
DO_MOB_SPAWNINGWhetherAgents should naturally spawn.This is a boolean game rule, with a default value of true.
- 
DO_PATROL_SPAWNINGWhetherpatrollerswill go out on patrol (typically in aRaid.This is a boolean game rule, with a default value of true.
- 
DO_TILE_DROPSWhether blocks should have drops.This is a boolean game rule, with a default value of true.
- 
DO_TRADER_SPAWNINGWhethertraderswill naturally spawn.This is a boolean game rule, with a default value of true.
- 
DO_WEATHER_CYCLEWhether the weather will change.This is a boolean game rule, with a default value of true.
- 
DROWNING_DAMAGEWhether entities should take drowning damage.This is a boolean game rule, with a default value of true.
- 
FALL_DAMAGEWhether entities should take fall damage.This is a boolean game rule, with a default value of true.
- 
FIRE_DAMAGEWhether entities should take fire damage.This is a boolean game rule, with a default value of true.
- 
FORGIVE_DEAD_PLAYERSMakes 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_DAMAGEWhether entities should take freeze damage.This is a boolean game rule, with a default value of true.
- 
KEEP_INVENTORYWhetherPlayers should keep items in their inventory after death.This is a boolean game rule, with a default value of false.
- 
LOG_ADMIN_COMMANDSWhether to log admin commands to server log.This is a boolean game rule, with a default value of true.
- 
MAX_COMMAND_CHAIN_LENGTHThe 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_CRAMMINGThe 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_GRIEFINGWhetherAgents 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_REGENERATIONWhetherPlayers 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_PERCENTAGEWhat percentage of players must sleep to skip the night.This is a numerical game rule, with a default value of 100.
- 
RANDOM_TICK_SPEEDHow 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_INFOWhether the debug screen shows all or reduced information.This is a boolean game rule, with a default value of false.
- 
SEND_COMMAND_FEEDBACKWhether 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_MESSAGESWhether a message appears in chat when aPlayerdies.This is a boolean game rule, with a default value of true.
- 
SPAWN_RADIUSThe 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_CHUNKSWhether players inspectator modecan generate chunks.This is a boolean game rule, with a default value of true.
- 
UNIVERSAL_ANGERMakes 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
 
-