Package net.minecraft.gametest.framework
Record Class TestEnvironmentDefinition.Functions
java.lang.Object
java.lang.Record
net.minecraft.gametest.framework.TestEnvironmentDefinition.Functions
- All Implemented Interfaces:
TestEnvironmentDefinition
- Enclosing interface:
TestEnvironmentDefinition
public static record TestEnvironmentDefinition.Functions(Optional<ResourceLocation> setupFunction, Optional<ResourceLocation> teardownFunction)
extends Record
implements TestEnvironmentDefinition
-
Nested Class Summary
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 TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<TestEnvironmentDefinition.Functions> private static final org.slf4j.Loggerprivate final Optional<ResourceLocation> The field for thesetupFunctionrecord component.private final Optional<ResourceLocation> The field for theteardownFunctionrecord component.Fields inherited from interface net.minecraft.gametest.framework.TestEnvironmentDefinition
DIRECT_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionFunctions(Optional<ResourceLocation> setupFunction, Optional<ResourceLocation> teardownFunction) Creates an instance of aFunctionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<TestEnvironmentDefinition.Functions> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.private static voidrun(ServerLevel pLevel, ResourceLocation pFunction) voidsetup(ServerLevel p_397955_) Returns the value of thesetupFunctionrecord component.voidteardown(ServerLevel p_397731_) Returns the value of theteardownFunctionrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
setupFunction
The field for thesetupFunctionrecord component. -
teardownFunction
The field for theteardownFunctionrecord component. -
LOGGER
private static final org.slf4j.Logger LOGGER -
CODEC
-
-
Constructor Details
-
Functions
public Functions(Optional<ResourceLocation> setupFunction, Optional<ResourceLocation> teardownFunction) Creates an instance of aFunctionsrecord class.- Parameters:
setupFunction- the value for thesetupFunctionrecord componentteardownFunction- the value for theteardownFunctionrecord component
-
-
Method Details
-
setup
- Specified by:
setupin interfaceTestEnvironmentDefinition
-
teardown
- Specified by:
teardownin interfaceTestEnvironmentDefinition
-
run
-
codec
- Specified by:
codecin interfaceTestEnvironmentDefinition
-
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). -
setupFunction
Returns the value of thesetupFunctionrecord component.- Returns:
- the value of the
setupFunctionrecord component
-
teardownFunction
Returns the value of theteardownFunctionrecord component.- Returns:
- the value of the
teardownFunctionrecord component
-