Package net.minecraft.gametest.framework
Record Class TestData<EnvironmentType>
java.lang.Object
java.lang.Record
net.minecraft.gametest.framework.TestData<EnvironmentType>
public record TestData<EnvironmentType>(EnvironmentType environment, ResourceLocation structure, int maxTicks, int setupTicks, boolean required, Rotation rotation, boolean manualOnly, int maxAttempts, int requiredSuccesses, boolean skyAccess)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec
<TestData<Holder<TestEnvironmentDefinition>>> private final EnvironmentType
The field for theenvironment
record component.private final boolean
The field for themanualOnly
record component.private final int
The field for themaxAttempts
record component.private final int
The field for themaxTicks
record component.private final boolean
The field for therequired
record component.private final int
The field for therequiredSuccesses
record component.private final Rotation
The field for therotation
record component.private final int
The field for thesetupTicks
record component.private final boolean
The field for theskyAccess
record component.private final ResourceLocation
The field for thestructure
record component. -
Constructor Summary
ConstructorsConstructorDescriptionTestData
(EnvironmentType p_397623_, ResourceLocation p_397576_, int p_397143_, int p_397037_, boolean p_397352_) TestData
(EnvironmentType p_397869_, ResourceLocation p_397537_, int p_397240_, int p_397081_, boolean p_397911_, Rotation p_397516_) TestData
(EnvironmentType environment, ResourceLocation structure, int maxTicks, int setupTicks, boolean required, Rotation rotation, boolean manualOnly, int maxAttempts, int requiredSuccesses, boolean skyAccess) Creates an instance of aTestData
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theenvironment
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of themanualOnly
record component.<T> TestData
<T> map
(Function<EnvironmentType, T> p_397000_) int
Returns the value of themaxAttempts
record component.int
maxTicks()
Returns the value of themaxTicks
record component.boolean
required()
Returns the value of therequired
record component.int
Returns the value of therequiredSuccesses
record component.rotation()
Returns the value of therotation
record component.int
Returns the value of thesetupTicks
record component.boolean
Returns the value of theskyAccess
record component.Returns the value of thestructure
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
environment
The field for theenvironment
record component. -
structure
The field for thestructure
record component. -
maxTicks
private final int maxTicksThe field for themaxTicks
record component. -
setupTicks
private final int setupTicksThe field for thesetupTicks
record component. -
required
private final boolean requiredThe field for therequired
record component. -
rotation
The field for therotation
record component. -
manualOnly
private final boolean manualOnlyThe field for themanualOnly
record component. -
maxAttempts
private final int maxAttemptsThe field for themaxAttempts
record component. -
requiredSuccesses
private final int requiredSuccessesThe field for therequiredSuccesses
record component. -
skyAccess
private final boolean skyAccessThe field for theskyAccess
record component. -
CODEC
public static final com.mojang.serialization.MapCodec<TestData<Holder<TestEnvironmentDefinition>>> CODEC
-
-
Constructor Details
-
TestData
public TestData(EnvironmentType p_397869_, ResourceLocation p_397537_, int p_397240_, int p_397081_, boolean p_397911_, Rotation p_397516_) -
TestData
public TestData(EnvironmentType p_397623_, ResourceLocation p_397576_, int p_397143_, int p_397037_, boolean p_397352_) -
TestData
public TestData(EnvironmentType environment, ResourceLocation structure, int maxTicks, int setupTicks, boolean required, Rotation rotation, boolean manualOnly, int maxAttempts, int requiredSuccesses, boolean skyAccess) Creates an instance of aTestData
record class.- Parameters:
environment
- the value for theenvironment
record componentstructure
- the value for thestructure
record componentmaxTicks
- the value for themaxTicks
record componentsetupTicks
- the value for thesetupTicks
record componentrequired
- the value for therequired
record componentrotation
- the value for therotation
record componentmanualOnly
- the value for themanualOnly
record componentmaxAttempts
- the value for themaxAttempts
record componentrequiredSuccesses
- the value for therequiredSuccesses
record componentskyAccess
- the value for theskyAccess
record component
-
-
Method Details
-
map
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
environment
Returns the value of theenvironment
record component.- Returns:
- the value of the
environment
record component
-
structure
Returns the value of thestructure
record component.- Returns:
- the value of the
structure
record component
-
maxTicks
public int maxTicks()Returns the value of themaxTicks
record component.- Returns:
- the value of the
maxTicks
record component
-
setupTicks
public int setupTicks()Returns the value of thesetupTicks
record component.- Returns:
- the value of the
setupTicks
record component
-
required
public boolean required()Returns the value of therequired
record component.- Returns:
- the value of the
required
record component
-
rotation
Returns the value of therotation
record component.- Returns:
- the value of the
rotation
record component
-
manualOnly
public boolean manualOnly()Returns the value of themanualOnly
record component.- Returns:
- the value of the
manualOnly
record component
-
maxAttempts
public int maxAttempts()Returns the value of themaxAttempts
record component.- Returns:
- the value of the
maxAttempts
record component
-
requiredSuccesses
public int requiredSuccesses()Returns the value of therequiredSuccesses
record component.- Returns:
- the value of the
requiredSuccesses
record component
-
skyAccess
public boolean skyAccess()Returns the value of theskyAccess
record component.- Returns:
- the value of the
skyAccess
record component
-