Enum Class SLPGameruleRegistry
- 所有已实现的接口:
Serializable,Comparable<SLPGameruleRegistry>,Constable
The enum Slp gamerule registry.
-
嵌套类概要
嵌套类从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
枚举常量概要
枚举常量 -
字段概要
字段修饰符和类型字段说明static final Map<String,SLPGameruleRegistry.RuleDataType> The constant gameruleDataTypes.The constant gamerules. -
方法概要
修饰符和类型方法说明static booleangetGameruleBoolValue(net.minecraft.world.level.Level level, String gameruleName) Gets gamerule bool value.static IntegergetGameruleIntValue(net.minecraft.world.level.Level level, String gameruleName) Gets gamerule int value.static voidregister()Register.voidregisterGamerule(String gameruleName, net.minecraft.world.level.GameRules.Category category, boolean pDefault) Register gamerule.voidregisterGamerule(String gameruleName, net.minecraft.world.level.GameRules.Category category, boolean pDefault, BiConsumer<net.minecraft.server.MinecraftServer, net.minecraft.world.level.GameRules.BooleanValue> pChangeListener) Register gamerule.voidregisterGamerule(String gameruleName, net.minecraft.world.level.GameRules.Category category, int pDefault) Register gamerule.voidregisterGamerule(String gameruleName, net.minecraft.world.level.GameRules.Category category, int pDefault, BiConsumer<net.minecraft.server.MinecraftServer, net.minecraft.world.level.GameRules.IntegerValue> pChangeListener) Register gamerule.static SLPGameruleRegistryReturns the enum constant of this class with the specified name.static SLPGameruleRegistry[]values()Returns an array containing the constants of this enum class, in the order they are declared.从类继承的方法 java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
枚举常量详细资料
-
INSTANCE
Instance slp gamerule registry.
-
-
字段详细资料
-
gamerules
The constant gamerules. -
gameruleDataTypes
The constant gameruleDataTypes.
-
-
方法详细资料
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- 返回:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- 如果参数为空值
-
getGameruleBoolValue
public static boolean getGameruleBoolValue(net.minecraft.world.level.Level level, String gameruleName) Gets gamerule bool value.- 参数:
level- the levelgameruleName- the gamerule name- 返回:
- the gamerule bool value
-
getGameruleIntValue
public static Integer getGameruleIntValue(net.minecraft.world.level.Level level, String gameruleName) Gets gamerule int value.- 参数:
level- the levelgameruleName- the gamerule name- 返回:
- the gamerule int value
-
registerGamerule
public void registerGamerule(String gameruleName, net.minecraft.world.level.GameRules.Category category, boolean pDefault) Register gamerule.- 参数:
gameruleName- the gamerule namecategory- the categorypDefault- the p default
-
registerGamerule
public void registerGamerule(String gameruleName, net.minecraft.world.level.GameRules.Category category, boolean pDefault, BiConsumer<net.minecraft.server.MinecraftServer, net.minecraft.world.level.GameRules.BooleanValue> pChangeListener) Register gamerule.- 参数:
gameruleName- the gamerule namecategory- the categorypDefault- the p defaultpChangeListener- the p change listener
-
registerGamerule
public void registerGamerule(String gameruleName, net.minecraft.world.level.GameRules.Category category, int pDefault) Register gamerule.- 参数:
gameruleName- the gamerule namecategory- the categorypDefault- the p default
-
registerGamerule
public void registerGamerule(String gameruleName, net.minecraft.world.level.GameRules.Category category, int pDefault, BiConsumer<net.minecraft.server.MinecraftServer, net.minecraft.world.level.GameRules.IntegerValue> pChangeListener) Register gamerule.- 参数:
gameruleName- the gamerule namecategory- the categorypDefault- the p defaultpChangeListener- the p change listener
-
register
public static void register()Register.
-