Record Class GeneratedTest
java.lang.Object
java.lang.Record
net.minecraft.gametest.framework.GeneratedTest
public record GeneratedTest(Map<Identifier, TestData<ResourceKey<TestEnvironmentDefinition<?>>>> tests, ResourceKey<Consumer<GameTestHelper>> functionKey, Consumer<GameTestHelper> function)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Consumer<GameTestHelper> The field for thefunctionrecord component.private final ResourceKey<Consumer<GameTestHelper>> The field for thefunctionKeyrecord component.private final Map<Identifier, TestData<ResourceKey<TestEnvironmentDefinition<?>>>> The field for thetestsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGeneratedTest(Map<Identifier, TestData<ResourceKey<TestEnvironmentDefinition<?>>>> tests, Identifier functionId, Consumer<GameTestHelper> function) GeneratedTest(Map<Identifier, TestData<ResourceKey<TestEnvironmentDefinition<?>>>> tests, ResourceKey<Consumer<GameTestHelper>> functionKey, Consumer<GameTestHelper> function) Creates an instance of aGeneratedTestrecord class.GeneratedTest(Identifier id, TestData<ResourceKey<TestEnvironmentDefinition<?>>> testData, Consumer<GameTestHelper> function) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.function()Returns the value of thefunctionrecord component.Returns the value of thefunctionKeyrecord component.final inthashCode()Returns a hash code value for this object.tests()Returns the value of thetestsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
tests
The field for thetestsrecord component. -
functionKey
The field for thefunctionKeyrecord component. -
function
The field for thefunctionrecord component.
-
-
Constructor Details
-
GeneratedTest
public GeneratedTest(Map<Identifier, TestData<ResourceKey<TestEnvironmentDefinition<?>>>> tests, Identifier functionId, Consumer<GameTestHelper> function) -
GeneratedTest
public GeneratedTest(Identifier id, TestData<ResourceKey<TestEnvironmentDefinition<?>>> testData, Consumer<GameTestHelper> function) -
GeneratedTest
public GeneratedTest(Map<Identifier, TestData<ResourceKey<TestEnvironmentDefinition<?>>>> tests, ResourceKey<Consumer<GameTestHelper>> functionKey, Consumer<GameTestHelper> function) Creates an instance of aGeneratedTestrecord class.- Parameters:
tests- the value for thetestsrecord componentfunctionKey- the value for thefunctionKeyrecord componentfunction- the value for thefunctionrecord component
-
-
Method Details
-
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). -
tests
Returns the value of thetestsrecord component.- Returns:
- the value of the
testsrecord component
-
functionKey
Returns the value of thefunctionKeyrecord component.- Returns:
- the value of the
functionKeyrecord component
-
function
Returns the value of thefunctionrecord component.- Returns:
- the value of the
functionrecord component
-