public class GameRules
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GameRules.BooleanValue |
static class |
GameRules.IntegerValue |
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>> |
Constructor and Description |
---|
GameRules() |
Modifier and Type | Method and Description |
---|---|
<T extends GameRules.RuleValue<T>> |
get(GameRules.RuleKey<T> key) |
boolean |
getBoolean(GameRules.RuleKey<GameRules.BooleanValue> key) |
int |
getInt(GameRules.RuleKey<GameRules.IntegerValue> key) |
void |
read(CompoundNBT nbt) |
static <T extends GameRules.RuleValue<T>> |
register(java.lang.String gameRuleName,
GameRules.RuleType<T> type) |
static void |
visitAll(GameRules.IRuleEntryVisitor visitor) |
private static <T extends GameRules.RuleValue<T>> |
visitHelper(GameRules.IRuleEntryVisitor visitor,
GameRules.RuleKey<?> key,
GameRules.RuleType<?> value) |
CompoundNBT |
write() |
private static final org.apache.logging.log4j.Logger LOGGER
private static final java.util.Map<GameRules.RuleKey<?>,GameRules.RuleType<?>> GAME_RULES
public static final GameRules.RuleKey<GameRules.BooleanValue> DO_FIRE_TICK
public static final GameRules.RuleKey<GameRules.BooleanValue> MOB_GRIEFING
public static final GameRules.RuleKey<GameRules.BooleanValue> KEEP_INVENTORY
public static final GameRules.RuleKey<GameRules.BooleanValue> DO_MOB_SPAWNING
public static final GameRules.RuleKey<GameRules.BooleanValue> DO_MOB_LOOT
public static final GameRules.RuleKey<GameRules.BooleanValue> DO_TILE_DROPS
public static final GameRules.RuleKey<GameRules.BooleanValue> DO_ENTITY_DROPS
public static final GameRules.RuleKey<GameRules.BooleanValue> COMMAND_BLOCK_OUTPUT
public static final GameRules.RuleKey<GameRules.BooleanValue> NATURAL_REGENERATION
public static final GameRules.RuleKey<GameRules.BooleanValue> DO_DAYLIGHT_CYCLE
public static final GameRules.RuleKey<GameRules.BooleanValue> LOG_ADMIN_COMMANDS
public static final GameRules.RuleKey<GameRules.BooleanValue> SHOW_DEATH_MESSAGES
public static final GameRules.RuleKey<GameRules.IntegerValue> RANDOM_TICK_SPEED
public static final GameRules.RuleKey<GameRules.BooleanValue> SEND_COMMAND_FEEDBACK
public static final GameRules.RuleKey<GameRules.BooleanValue> REDUCED_DEBUG_INFO
public static final GameRules.RuleKey<GameRules.BooleanValue> SPECTATORS_GENERATE_CHUNKS
public static final GameRules.RuleKey<GameRules.IntegerValue> SPAWN_RADIUS
public static final GameRules.RuleKey<GameRules.BooleanValue> DISABLE_ELYTRA_MOVEMENT_CHECK
public static final GameRules.RuleKey<GameRules.IntegerValue> MAX_ENTITY_CRAMMING
public static final GameRules.RuleKey<GameRules.BooleanValue> DO_WEATHER_CYCLE
public static final GameRules.RuleKey<GameRules.BooleanValue> DO_LIMITED_CRAFTING
public static final GameRules.RuleKey<GameRules.IntegerValue> MAX_COMMAND_CHAIN_LENGTH
public static final GameRules.RuleKey<GameRules.BooleanValue> ANNOUNCE_ADVANCEMENTS
public static final GameRules.RuleKey<GameRules.BooleanValue> DISABLE_RAIDS
public static final GameRules.RuleKey<GameRules.BooleanValue> DO_INSOMNIA
public static final GameRules.RuleKey<GameRules.BooleanValue> DO_IMMEDIATE_RESPAWN
public static final GameRules.RuleKey<GameRules.BooleanValue> DROWNING_DAMAGE
public static final GameRules.RuleKey<GameRules.BooleanValue> FALL_DAMAGE
public static final GameRules.RuleKey<GameRules.BooleanValue> FIRE_DAMAGE
public static final GameRules.RuleKey<GameRules.BooleanValue> field_230127_D_
public static final GameRules.RuleKey<GameRules.BooleanValue> field_230128_E_
private final java.util.Map<GameRules.RuleKey<?>,GameRules.RuleValue<?>> rules
public static <T extends GameRules.RuleValue<T>> GameRules.RuleKey<T> register(java.lang.String gameRuleName, GameRules.RuleType<T> type)
public <T extends GameRules.RuleValue<T>> T get(GameRules.RuleKey<T> key)
public CompoundNBT write()
public void read(CompoundNBT nbt)
public static void visitAll(GameRules.IRuleEntryVisitor visitor)
private static <T extends GameRules.RuleValue<T>> void visitHelper(GameRules.IRuleEntryVisitor visitor, GameRules.RuleKey<?> key, GameRules.RuleType<?> value)
public boolean getBoolean(GameRules.RuleKey<GameRules.BooleanValue> key)
public int getInt(GameRules.RuleKey<GameRules.IntegerValue> key)