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 recordNested 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 theboolRulesrecord component.static final com.mojang.serialization.MapCodec<TestEnvironmentDefinition.SetGameRules> The field for theintRulesrecord 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 aSetGameRulesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theboolRulesrecord component.com.mojang.serialization.MapCodec<TestEnvironmentDefinition.SetGameRules> codec()static <S,T extends GameRules.Value<T>>
TestEnvironmentDefinition.SetGameRules.Entry<S, T> entry(GameRules.Key<T> pKey, S pValue) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intRules()Returns the value of theintRulesrecord component.voidsetup(ServerLevel pLevel) voidteardown(ServerLevel pLevel) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
boolRules
private final List<TestEnvironmentDefinition.SetGameRules.Entry<Boolean,GameRules.BooleanValue>> boolRulesThe field for theboolRulesrecord component. -
intRules
private final List<TestEnvironmentDefinition.SetGameRules.Entry<Integer,GameRules.IntegerValue>> intRulesThe field for theintRulesrecord 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 aSetGameRulesrecord class.- Parameters:
boolRules- the value for theboolRulesrecord componentintRules- the value for theintRulesrecord component
-
-
Method Details
-
setup
- Specified by:
setupin interfaceTestEnvironmentDefinition
-
teardown
- Specified by:
teardownin interfaceTestEnvironmentDefinition
-
codec
- Specified by:
codecin interfaceTestEnvironmentDefinition
-
entry
public static <S,T extends GameRules.Value<T>> TestEnvironmentDefinition.SetGameRules.Entry<S,T> entry(GameRules.Key<T> pKey, S pValue) -
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 theboolRulesrecord component.- Returns:
- the value of the
boolRulesrecord component
-
intRules
public List<TestEnvironmentDefinition.SetGameRules.Entry<Integer,GameRules.IntegerValue>> intRules()Returns the value of theintRulesrecord component.- Returns:
- the value of the
intRulesrecord component
-