Package net.minecraft.gametest.framework
Record Class TestEnvironmentDefinition.SetGameRules
java.lang.Object
java.lang.Record
net.minecraft.gametest.framework.TestEnvironmentDefinition.SetGameRules
- All Implemented Interfaces:
TestEnvironmentDefinition
- Enclosing interface:
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Nested classes/interfaces inherited from interface net.minecraft.gametest.framework.TestEnvironmentDefinition
TestEnvironmentDefinition.AllOf, TestEnvironmentDefinition.Functions, TestEnvironmentDefinition.SetGameRules, TestEnvironmentDefinition.TimeOfDay, TestEnvironmentDefinition.Weather
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theboolRules
record component.static final com.mojang.serialization.MapCodec
<TestEnvironmentDefinition.SetGameRules> The field for theintRules
record component.Fields inherited from interface net.minecraft.gametest.framework.TestEnvironmentDefinition
DIRECT_CODEC
-
Constructor Summary
ConstructorsConstructorDescriptionSetGameRules
(List<TestEnvironmentDefinition.SetGameRules.Entry<Boolean, GameRules.BooleanValue>> boolRules, List<TestEnvironmentDefinition.SetGameRules.Entry<Integer, GameRules.IntegerValue>> intRules) Creates an instance of aSetGameRules
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theboolRules
record component.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
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.intRules()
Returns the value of theintRules
record component.void
setup
(ServerLevel p_397170_) void
teardown
(ServerLevel p_397717_) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
boolRules
private final List<TestEnvironmentDefinition.SetGameRules.Entry<Boolean,GameRules.BooleanValue>> boolRulesThe field for theboolRules
record component. -
intRules
private final List<TestEnvironmentDefinition.SetGameRules.Entry<Integer,GameRules.IntegerValue>> intRulesThe field for theintRules
record component. -
CODEC
-
-
Constructor Details
-
SetGameRules
public SetGameRules(List<TestEnvironmentDefinition.SetGameRules.Entry<Boolean, GameRules.BooleanValue>> boolRules, List<TestEnvironmentDefinition.SetGameRules.Entry<Integer, GameRules.IntegerValue>> intRules) Creates an instance of aSetGameRules
record class.- Parameters:
boolRules
- the value for theboolRules
record componentintRules
- the value for theintRules
record component
-
-
Method Details
-
setup
- Specified by:
setup
in interfaceTestEnvironmentDefinition
-
teardown
- Specified by:
teardown
in interfaceTestEnvironmentDefinition
-
codec
- Specified by:
codec
in interfaceTestEnvironmentDefinition
-
entry
public static <S,T extends GameRules.Value<T>> TestEnvironmentDefinition.SetGameRules.Entry<S,T> entry(GameRules.Key<T> p_397315_, S p_397234_) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
boolRules
public List<TestEnvironmentDefinition.SetGameRules.Entry<Boolean,GameRules.BooleanValue>> boolRules()Returns the value of theboolRules
record component.- Returns:
- the value of the
boolRules
record component
-
intRules
public List<TestEnvironmentDefinition.SetGameRules.Entry<Integer,GameRules.IntegerValue>> intRules()Returns the value of theintRules
record component.- Returns:
- the value of the
intRules
record component
-