Class GameRules


  • public final class GameRules
    extends java.lang.Object
    An enumeration of all the possible game rules in vanilla minecraft.
    • Field Detail

      • ANNOUNCE_ADVANCEMENTS

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> 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

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> COMMAND_BLOCK_OUTPUT
        Whether CommandBlocks should notify admins when they perform commands.

        This is a boolean game rule, with a default value of true.

      • DISABLE_ELYTRA_MOVEMENT_CHECK

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> 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

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> DISABLE_RAIDS
        Whether Raids are disabled.

        If the value of this game rule is true, all Raids will stop.

        This is a boolean game rule, with a default value of false.

      • DO_DAYLIGHT_CYCLE

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> 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

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> 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

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> DO_FIRE_TICK
        Whether fire should spread and naturally extinguish.

        This is a boolean game rule, with a default value of true.

      • DO_INSOMNIA

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> DO_INSOMNIA
        Whether Phantoms can spawn in the night-time.

        This is a boolean game rule, with a default value of true.

      • DO_IMMEDIATE_RESPAWN

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> DO_IMMEDIATE_RESPAWN
        Whether Players should respawn immediately without showing the death screen.

        This is a boolean game rule, with a default value of true.

      • DO_LIMITED_CRAFTING

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> DO_LIMITED_CRAFTING
        Whether Players can only craft recipes they have unlocked.

        This is a boolean game rule, with a default value of false.

      • DO_MOB_LOOT

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> DO_MOB_LOOT
        Whether Agents should drop items.

        This is a boolean game rule, with a default value of true.

      • DO_MOB_SPAWNING

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> DO_MOB_SPAWNING
        Whether Agents should naturally spawn.

        This is a boolean game rule, with a default value of true.

      • DO_TILE_DROPS

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> DO_TILE_DROPS
        Whether blocks should have drops.

        This is a boolean game rule, with a default value of true.

      • DO_TRADER_SPAWNING

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> DO_TRADER_SPAWNING
        Whether traders will naturally spawn.

        This is a boolean game rule, with a default value of true.

      • DO_WEATHER_CYCLE

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> DO_WEATHER_CYCLE
        Whether the weather will change.

        This is a boolean game rule, with a default value of true.

      • DROWNING_DAMAGE

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> DROWNING_DAMAGE
        Whether entities should take drowning damage.

        This is a boolean game rule, with a default value of true.

      • FALL_DAMAGE

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> FALL_DAMAGE
        Whether entities should take fall damage.

        This is a boolean game rule, with a default value of true.

      • FIRE_DAMAGE

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> FIRE_DAMAGE
        Whether entities should take fire damage.

        This is a boolean game rule, with a default value of true.

      • FORGIVE_DEAD_PLAYERS

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> 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.

      • KEEP_INVENTORY

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> KEEP_INVENTORY
        Whether Players should keep items in their inventory after death.

        This is a boolean game rule, with a default value of false.

      • LOG_ADMIN_COMMANDS

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> LOG_ADMIN_COMMANDS
        Whether to log admin commands to server log.

        This is a boolean game rule, with a default value of true.

      • MAX_ENTITY_CRAMMING

        public static final DefaultedRegistryReference<GameRule<java.lang.Integer>> 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 mode or adventure mode Players, and all mobs but bats. Pushable entities include non-spectator-mode Player, any mob except Bats, as well as Boats and MinecartLike.

        Setting to 0 disables the rule.

        This is a numerical game rule, with a default value of 24.

      • NATURAL_REGENERATION

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> NATURAL_REGENERATION
        Whether Players 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.

      • RANDOM_TICK_SPEED

        public static final DefaultedRegistryReference<GameRule<java.lang.Integer>> 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

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> 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

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> SEND_COMMAND_FEEDBACK
        Whether the feedback from commands executed by a Player should 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

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> SHOW_DEATH_MESSAGES
        Whether a message appears in chat when a Player dies.

        This is a boolean game rule, with a default value of true.

      • SPAWN_RADIUS

        public static final DefaultedRegistryReference<GameRule<java.lang.Integer>> 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

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> SPECTATORS_GENERATE_CHUNKS
        Whether players in spectator mode can generate chunks.

        This is a boolean game rule, with a default value of true.

      • UNIVERSAL_ANGER

        public static final DefaultedRegistryReference<GameRule<java.lang.Boolean>> 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.