Record Class TestEnvironmentDefinition.SetGameRules
java.lang.Object
java.lang.Record
net.minecraft.gametest.framework.TestEnvironmentDefinition.SetGameRules
- All Implemented Interfaces:
TestEnvironmentDefinition<GameRuleMap>
- Enclosing interface:
TestEnvironmentDefinition<SavedDataType>
public static record TestEnvironmentDefinition.SetGameRules(GameRuleMap gameRulesMap)
extends Record
implements TestEnvironmentDefinition<GameRuleMap>
-
Nested Class Summary
Nested classes/interfaces inherited from interface TestEnvironmentDefinition
TestEnvironmentDefinition.Activation<T>, TestEnvironmentDefinition.AllOf, TestEnvironmentDefinition.ClockTime, TestEnvironmentDefinition.Functions, TestEnvironmentDefinition.SetGameRules, TestEnvironmentDefinition.Weather -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<TestEnvironmentDefinition.SetGameRules> private final GameRuleMapThe field for thegameRulesMaprecord component.Fields inherited from interface TestEnvironmentDefinition
DIRECT_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionSetGameRules(GameRuleMap gameRulesMap) Creates an instance of aSetGameRulesrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<TestEnvironmentDefinition.SetGameRules> codec()final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegameRulesMaprecord component.final inthashCode()Returns a hash code value for this object.private static <T> voidsetFromActive(GameRuleMap map, GameRule<T> rule, GameRules rules) setup(ServerLevel level) voidteardown(ServerLevel level, GameRuleMap saveData) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
gameRulesMap
The field for thegameRulesMaprecord component. -
CODEC
-
-
Constructor Details
-
SetGameRules
Creates an instance of aSetGameRulesrecord class.- Parameters:
gameRulesMap- the value for thegameRulesMaprecord component
-
-
Method Details
-
setup
- Specified by:
setupin interfaceTestEnvironmentDefinition<GameRuleMap>
-
setFromActive
-
teardown
- Specified by:
teardownin interfaceTestEnvironmentDefinition<GameRuleMap>
-
codec
- Specified by:
codecin interfaceTestEnvironmentDefinition<GameRuleMap>
-
toString
-
hashCode
-
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). -
gameRulesMap
Returns the value of thegameRulesMaprecord component.- Returns:
- the value of the
gameRulesMaprecord component
-