记录类 TestEnvironmentDefinition.SetGameRules
java.lang.Object
java.lang.Record
net.minecraft.gametest.framework.TestEnvironmentDefinition.SetGameRules
- 所有已实现的接口:
TestEnvironmentDefinition
public static record TestEnvironmentDefinition.SetGameRules(List<TestEnvironmentDefinition.SetGameRules.Entry<Boolean,GameRules.BooleanValue>> boolRules, List<TestEnvironmentDefinition.SetGameRules.Entry<Integer,GameRules.IntegerValue>> intRules)
extends Record
implements TestEnvironmentDefinition
-
嵌套类概要
嵌套类修饰符和类型类说明static final record
从接口继承的嵌套类/接口 net.minecraft.gametest.framework.TestEnvironmentDefinition
TestEnvironmentDefinition.AllOf, TestEnvironmentDefinition.Functions, TestEnvironmentDefinition.SetGameRules, TestEnvironmentDefinition.TimeOfDay, TestEnvironmentDefinition.Weather
-
字段概要
字段修饰符和类型字段说明boolRules
记录组件的字段。static final com.mojang.serialization.MapCodec
<TestEnvironmentDefinition.SetGameRules> intRules
记录组件的字段。从接口继承的字段 net.minecraft.gametest.framework.TestEnvironmentDefinition
DIRECT_CODEC
-
构造器概要
构造器构造器说明SetGameRules
(List<TestEnvironmentDefinition.SetGameRules.Entry<Boolean, GameRules.BooleanValue>> boolRules, List<TestEnvironmentDefinition.SetGameRules.Entry<Integer, GameRules.IntegerValue>> intRules) 创建SetGameRules
记录类的实例。 -
方法概要
修饰符和类型方法说明返回boolRules
记录组件的值。com.mojang.serialization.MapCodec
<TestEnvironmentDefinition.SetGameRules> codec()
static <S,
T extends GameRules.Value<T>>
TestEnvironmentDefinition.SetGameRules.Entry<S, T> entry
(GameRules.Key<T> p_397315_, S p_397234_) final boolean
指示某个其他对象是否“等于”此对象。final int
hashCode()
返回此对象的哈希代码值。intRules()
返回intRules
记录组件的值。void
setup
(ServerLevel p_397170_) void
teardown
(ServerLevel p_397717_) final String
toString()
返回此记录类的字符串表示形式。
-
字段详细资料
-
boolRules
private final List<TestEnvironmentDefinition.SetGameRules.Entry<Boolean,GameRules.BooleanValue>> boolRulesboolRules
记录组件的字段。 -
intRules
private final List<TestEnvironmentDefinition.SetGameRules.Entry<Integer,GameRules.IntegerValue>> intRulesintRules
记录组件的字段。 -
CODEC
-
-
构造器详细资料
-
SetGameRules
public SetGameRules(List<TestEnvironmentDefinition.SetGameRules.Entry<Boolean, GameRules.BooleanValue>> boolRules, List<TestEnvironmentDefinition.SetGameRules.Entry<Integer, GameRules.IntegerValue>> intRules) 创建SetGameRules
记录类的实例。- 参数:
boolRules
-boolRules
记录组件的值intRules
-intRules
记录组件的值
-
-
方法详细资料
-
setup
- 指定者:
setup
在接口中TestEnvironmentDefinition
-
teardown
- 指定者:
teardown
在接口中TestEnvironmentDefinition
-
codec
- 指定者:
codec
在接口中TestEnvironmentDefinition
-
entry
public static <S,T extends GameRules.Value<T>> TestEnvironmentDefinition.SetGameRules.Entry<S,T> entry(GameRules.Key<T> p_397315_, S p_397234_) -
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用Objects::equals(Object,Object)
进行比较。 -
boolRules
public List<TestEnvironmentDefinition.SetGameRules.Entry<Boolean,GameRules.BooleanValue>> boolRules()返回boolRules
记录组件的值。- 返回:
boolRules
记录组件的值
-
intRules
public List<TestEnvironmentDefinition.SetGameRules.Entry<Integer,GameRules.IntegerValue>> intRules()返回intRules
记录组件的值。- 返回:
intRules
记录组件的值
-