Record Class TestData<EnvironmentType>
java.lang.Object
java.lang.Record
net.minecraft.gametest.framework.TestData<EnvironmentType>
public record TestData<EnvironmentType>(EnvironmentType environment, Identifier structure, int maxTicks, int setupTicks, boolean required, Rotation rotation, boolean manualOnly, int maxAttempts, int requiredSuccesses, boolean skyAccess, int padding)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<TestData<Holder<TestEnvironmentDefinition<?>>>> private final EnvironmentTypeThe field for theenvironmentrecord component.private final booleanThe field for themanualOnlyrecord component.private final intThe field for themaxAttemptsrecord component.private final intThe field for themaxTicksrecord component.private final intThe field for thepaddingrecord component.private final booleanThe field for therequiredrecord component.private final intThe field for therequiredSuccessesrecord component.private final RotationThe field for therotationrecord component.private final intThe field for thesetupTicksrecord component.private final booleanThe field for theskyAccessrecord component.private final IdentifierThe field for thestructurerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTestData(EnvironmentType environment, Identifier structure, int maxTicks, int setupTicks, boolean required) TestData(EnvironmentType environment, Identifier structure, int maxTicks, int setupTicks, boolean required, Rotation rotation) TestData(EnvironmentType environment, Identifier structure, int maxTicks, int setupTicks, boolean required, Rotation rotation, boolean manualOnly, int maxAttempts, int requiredSuccesses, boolean skyAccess, int padding) Creates an instance of aTestDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theenvironmentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of themanualOnlyrecord component.<T> TestData<T> map(Function<EnvironmentType, T> mapper) intReturns the value of themaxAttemptsrecord component.intmaxTicks()Returns the value of themaxTicksrecord component.intpadding()Returns the value of thepaddingrecord component.booleanrequired()Returns the value of therequiredrecord component.intReturns the value of therequiredSuccessesrecord component.rotation()Returns the value of therotationrecord component.intReturns the value of thesetupTicksrecord component.booleanReturns the value of theskyAccessrecord component.Returns the value of thestructurerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
environment
The field for theenvironmentrecord component. -
structure
The field for thestructurerecord component. -
maxTicks
private final int maxTicksThe field for themaxTicksrecord component. -
setupTicks
private final int setupTicksThe field for thesetupTicksrecord component. -
required
private final boolean requiredThe field for therequiredrecord component. -
rotation
The field for therotationrecord component. -
manualOnly
private final boolean manualOnlyThe field for themanualOnlyrecord component. -
maxAttempts
private final int maxAttemptsThe field for themaxAttemptsrecord component. -
requiredSuccesses
private final int requiredSuccessesThe field for therequiredSuccessesrecord component. -
skyAccess
private final boolean skyAccessThe field for theskyAccessrecord component. -
padding
private final int paddingThe field for thepaddingrecord component. -
CODEC
public static final com.mojang.serialization.MapCodec<TestData<Holder<TestEnvironmentDefinition<?>>>> CODEC
-
-
Constructor Details
-
TestData
public TestData(EnvironmentType environment, Identifier structure, int maxTicks, int setupTicks, boolean required, Rotation rotation) -
TestData
public TestData(EnvironmentType environment, Identifier structure, int maxTicks, int setupTicks, boolean required) -
TestData
public TestData(EnvironmentType environment, Identifier structure, int maxTicks, int setupTicks, boolean required, Rotation rotation, boolean manualOnly, int maxAttempts, int requiredSuccesses, boolean skyAccess, int padding) Creates an instance of aTestDatarecord class.- Parameters:
environment- the value for theenvironmentrecord componentstructure- the value for thestructurerecord componentmaxTicks- the value for themaxTicksrecord componentsetupTicks- the value for thesetupTicksrecord componentrequired- the value for therequiredrecord componentrotation- the value for therotationrecord componentmanualOnly- the value for themanualOnlyrecord componentmaxAttempts- the value for themaxAttemptsrecord componentrequiredSuccesses- the value for therequiredSuccessesrecord componentskyAccess- the value for theskyAccessrecord componentpadding- the value for thepaddingrecord component
-
-
Method Details
-
map
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
environment
Returns the value of theenvironmentrecord component.- Returns:
- the value of the
environmentrecord component
-
structure
Returns the value of thestructurerecord component.- Returns:
- the value of the
structurerecord component
-
maxTicks
public int maxTicks()Returns the value of themaxTicksrecord component.- Returns:
- the value of the
maxTicksrecord component
-
setupTicks
public int setupTicks()Returns the value of thesetupTicksrecord component.- Returns:
- the value of the
setupTicksrecord component
-
required
public boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-
rotation
Returns the value of therotationrecord component.- Returns:
- the value of the
rotationrecord component
-
manualOnly
public boolean manualOnly()Returns the value of themanualOnlyrecord component.- Returns:
- the value of the
manualOnlyrecord component
-
maxAttempts
public int maxAttempts()Returns the value of themaxAttemptsrecord component.- Returns:
- the value of the
maxAttemptsrecord component
-
requiredSuccesses
public int requiredSuccesses()Returns the value of therequiredSuccessesrecord component.- Returns:
- the value of the
requiredSuccessesrecord component
-
skyAccess
public boolean skyAccess()Returns the value of theskyAccessrecord component.- Returns:
- the value of the
skyAccessrecord component
-
padding
public int padding()Returns the value of thepaddingrecord component.- Returns:
- the value of the
paddingrecord component
-