Package net.minecraft.world.level
Class GameRules
java.lang.Object
net.minecraft.world.level.GameRules
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
static interface
static class
static final class
GameRules.Key<T extends GameRules.Value<T>>
static class
GameRules.Type<T extends GameRules.Value<T>>
static class
GameRules.Value<T extends GameRules.Value<T>>
(package private) static interface
GameRules.VisitorCaller<T extends GameRules.Value<T>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
private static final Map<GameRules.Key<?>,
GameRules.Type<?>> (package private) static final org.slf4j.Logger
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.IntegerValue>
static final GameRules.Key<GameRules.IntegerValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.IntegerValue>
static final GameRules.Key<GameRules.IntegerValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.IntegerValue>
static final GameRules.Key<GameRules.IntegerValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
static final GameRules.Key<GameRules.BooleanValue>
private final Map<GameRules.Key<?>,
GameRules.Value<?>> -
Constructor Summary
ModifierConstructorDescriptionGameRules
(com.mojang.serialization.DynamicLike<?> p_46160_) private
GameRules
(Map<GameRules.Key<?>, GameRules.Value<?>> p_46162_) -
Method Summary
Modifier and TypeMethodDescriptionprivate <T extends GameRules.Value<T>>
voidassignCap
(GameRules.Key<T> p_46173_, GameRules p_46174_, MinecraftServer p_46175_) void
assignFrom
(GameRules p_46177_, MinecraftServer p_46178_) private static <T extends GameRules.Value<T>>
voidcallVisitorCap
(GameRules.GameRuleTypeVisitor p_46167_, GameRules.Key<?> p_46168_, GameRules.Type<?> p_46169_) copy()
boolean
getBoolean
(GameRules.Key<GameRules.BooleanValue> p_46208_) int
getInt
(GameRules.Key<GameRules.IntegerValue> p_46216_) <T extends GameRules.Value<T>>
TgetRule
(GameRules.Key<T> p_46171_) private void
loadFromTag
(com.mojang.serialization.DynamicLike<?> p_46184_) static <T extends GameRules.Value<T>>
GameRules.Key<T>register
(String p_46190_, GameRules.Category p_46191_, GameRules.Type<T> p_46192_) static void
-
Field Details
-
DEFAULT_RANDOM_TICK_SPEED
public static final int DEFAULT_RANDOM_TICK_SPEED- See Also:
-
LOGGER
static final org.slf4j.Logger LOGGER -
GAME_RULE_TYPES
-
RULE_DOFIRETICK
-
RULE_MOBGRIEFING
-
RULE_KEEPINVENTORY
-
RULE_DOMOBSPAWNING
-
RULE_DOMOBLOOT
-
RULE_DOBLOCKDROPS
-
RULE_DOENTITYDROPS
-
RULE_COMMANDBLOCKOUTPUT
-
RULE_NATURAL_REGENERATION
-
RULE_DAYLIGHT
-
RULE_LOGADMINCOMMANDS
-
RULE_SHOWDEATHMESSAGES
-
RULE_RANDOMTICKING
-
RULE_SENDCOMMANDFEEDBACK
-
RULE_REDUCEDDEBUGINFO
-
RULE_SPECTATORSGENERATECHUNKS
-
RULE_SPAWN_RADIUS
-
RULE_DISABLE_ELYTRA_MOVEMENT_CHECK
-
RULE_MAX_ENTITY_CRAMMING
-
RULE_WEATHER_CYCLE
-
RULE_LIMITED_CRAFTING
-
RULE_MAX_COMMAND_CHAIN_LENGTH
-
RULE_ANNOUNCE_ADVANCEMENTS
-
RULE_DISABLE_RAIDS
-
RULE_DOINSOMNIA
-
RULE_DO_IMMEDIATE_RESPAWN
-
RULE_DROWNING_DAMAGE
-
RULE_FALL_DAMAGE
-
RULE_FIRE_DAMAGE
-
RULE_FREEZE_DAMAGE
-
RULE_DO_PATROL_SPAWNING
-
RULE_DO_TRADER_SPAWNING
-
RULE_DO_WARDEN_SPAWNING
-
RULE_FORGIVE_DEAD_PLAYERS
-
RULE_UNIVERSAL_ANGER
-
RULE_PLAYERS_SLEEPING_PERCENTAGE
-
RULE_BLOCK_EXPLOSION_DROP_DECAY
-
RULE_MOB_EXPLOSION_DROP_DECAY
-
RULE_TNT_EXPLOSION_DROP_DECAY
-
RULE_SNOW_ACCUMULATION_HEIGHT
-
RULE_WATER_SOURCE_CONVERSION
-
RULE_LAVA_SOURCE_CONVERSION
-
RULE_GLOBAL_SOUND_EVENTS
-
rules
-
-
Constructor Details
-
GameRules
public GameRules(com.mojang.serialization.DynamicLike<?> p_46160_) -
GameRules
public GameRules() -
GameRules
-
-
Method Details
-
register
public static <T extends GameRules.Value<T>> GameRules.Key<T> register(String p_46190_, GameRules.Category p_46191_, GameRules.Type<T> p_46192_) -
getRule
-
createTag
-
loadFromTag
private void loadFromTag(com.mojang.serialization.DynamicLike<?> p_46184_) -
copy
-
visitGameRuleTypes
-
callVisitorCap
private static <T extends GameRules.Value<T>> void callVisitorCap(GameRules.GameRuleTypeVisitor p_46167_, GameRules.Key<?> p_46168_, GameRules.Type<?> p_46169_) -
assignFrom
-
assignCap
private <T extends GameRules.Value<T>> void assignCap(GameRules.Key<T> p_46173_, GameRules p_46174_, @Nullable MinecraftServer p_46175_) -
getBoolean
-
getInt
-