Package net.minecraft.world
Class GameRules
- java.lang.Object
-
- net.minecraft.world.GameRules
-
public class GameRules extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GameRules.BooleanValue
static class
GameRules.Category
static class
GameRules.IntegerValue
(package private) static interface
GameRules.IRule<T extends GameRules.RuleValue<T>>
static interface
GameRules.IRuleEntryVisitor
static class
GameRules.RuleKey<T extends GameRules.RuleValue<T>>
static class
GameRules.RuleType<T extends GameRules.RuleValue<T>>
static class
GameRules.RuleValue<T extends GameRules.RuleValue<T>>
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description GameRules()
GameRules(com.mojang.serialization.DynamicLike<?> p_i231611_1_)
private
GameRules(java.util.Map<GameRules.RuleKey<?>,GameRules.RuleValue<?>> p_i231612_1_)
-
Method Summary
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
GAME_RULE_TYPES
private static final java.util.Map<GameRules.RuleKey<?>,GameRules.RuleType<?>> GAME_RULE_TYPES
-
RULE_DOFIRETICK
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_DOFIRETICK
-
RULE_MOBGRIEFING
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_MOBGRIEFING
-
RULE_KEEPINVENTORY
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_KEEPINVENTORY
-
RULE_DOMOBSPAWNING
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_DOMOBSPAWNING
-
RULE_DOMOBLOOT
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_DOMOBLOOT
-
RULE_DOBLOCKDROPS
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_DOBLOCKDROPS
-
RULE_DOENTITYDROPS
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_DOENTITYDROPS
-
RULE_COMMANDBLOCKOUTPUT
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_COMMANDBLOCKOUTPUT
-
RULE_NATURAL_REGENERATION
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_NATURAL_REGENERATION
-
RULE_DAYLIGHT
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_DAYLIGHT
-
RULE_LOGADMINCOMMANDS
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_LOGADMINCOMMANDS
-
RULE_SHOWDEATHMESSAGES
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_SHOWDEATHMESSAGES
-
RULE_RANDOMTICKING
public static final GameRules.RuleKey<GameRules.IntegerValue> RULE_RANDOMTICKING
-
RULE_SENDCOMMANDFEEDBACK
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_SENDCOMMANDFEEDBACK
-
RULE_REDUCEDDEBUGINFO
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_REDUCEDDEBUGINFO
-
RULE_SPECTATORSGENERATECHUNKS
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_SPECTATORSGENERATECHUNKS
-
RULE_SPAWN_RADIUS
public static final GameRules.RuleKey<GameRules.IntegerValue> RULE_SPAWN_RADIUS
-
RULE_DISABLE_ELYTRA_MOVEMENT_CHECK
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_DISABLE_ELYTRA_MOVEMENT_CHECK
-
RULE_MAX_ENTITY_CRAMMING
public static final GameRules.RuleKey<GameRules.IntegerValue> RULE_MAX_ENTITY_CRAMMING
-
RULE_WEATHER_CYCLE
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_WEATHER_CYCLE
-
RULE_LIMITED_CRAFTING
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_LIMITED_CRAFTING
-
RULE_MAX_COMMAND_CHAIN_LENGTH
public static final GameRules.RuleKey<GameRules.IntegerValue> RULE_MAX_COMMAND_CHAIN_LENGTH
-
RULE_ANNOUNCE_ADVANCEMENTS
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_ANNOUNCE_ADVANCEMENTS
-
RULE_DISABLE_RAIDS
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_DISABLE_RAIDS
-
RULE_DOINSOMNIA
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_DOINSOMNIA
-
RULE_DO_IMMEDIATE_RESPAWN
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_DO_IMMEDIATE_RESPAWN
-
RULE_DROWNING_DAMAGE
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_DROWNING_DAMAGE
-
RULE_FALL_DAMAGE
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_FALL_DAMAGE
-
RULE_FIRE_DAMAGE
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_FIRE_DAMAGE
-
RULE_DO_PATROL_SPAWNING
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_DO_PATROL_SPAWNING
-
RULE_DO_TRADER_SPAWNING
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_DO_TRADER_SPAWNING
-
RULE_FORGIVE_DEAD_PLAYERS
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_FORGIVE_DEAD_PLAYERS
-
RULE_UNIVERSAL_ANGER
public static final GameRules.RuleKey<GameRules.BooleanValue> RULE_UNIVERSAL_ANGER
-
rules
private final java.util.Map<GameRules.RuleKey<?>,GameRules.RuleValue<?>> rules
-
-
Constructor Detail
-
GameRules
public GameRules(com.mojang.serialization.DynamicLike<?> p_i231611_1_)
-
GameRules
public GameRules()
-
GameRules
private GameRules(java.util.Map<GameRules.RuleKey<?>,GameRules.RuleValue<?>> p_i231612_1_)
-
-
Method Detail
-
register
public static <T extends GameRules.RuleValue<T>> GameRules.RuleKey<T> register(java.lang.String p_234903_0_, GameRules.Category p_234903_1_, GameRules.RuleType<T> p_234903_2_)
-
getRule
public <T extends GameRules.RuleValue<T>> T getRule(GameRules.RuleKey<T> p_223585_1_)
-
createTag
public CompoundNBT createTag()
-
loadFromTag
private void loadFromTag(com.mojang.serialization.DynamicLike<?> p_234901_1_)
-
copy
public GameRules copy()
-
visitGameRuleTypes
public static void visitGameRuleTypes(GameRules.IRuleEntryVisitor p_223590_0_)
-
callVisitorCap
private static <T extends GameRules.RuleValue<T>> void callVisitorCap(GameRules.IRuleEntryVisitor p_234897_0_, GameRules.RuleKey<?> p_234897_1_, GameRules.RuleType<?> p_234897_2_)
-
assignFrom
public void assignFrom(GameRules p_234899_1_, @Nullable MinecraftServer p_234899_2_)
-
assignCap
private <T extends GameRules.RuleValue<T>> void assignCap(GameRules.RuleKey<T> p_234898_1_, GameRules p_234898_2_, @Nullable MinecraftServer p_234898_3_)
-
getBoolean
public boolean getBoolean(GameRules.RuleKey<GameRules.BooleanValue> p_223586_1_)
-
getInt
public int getInt(GameRules.RuleKey<GameRules.IntegerValue> p_223592_1_)
-
-