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

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.MapCodec<TestData<Holder<TestEnvironmentDefinition<?>>>>
     
    private final EnvironmentType
    The field for the environment record component.
    private final boolean
    The field for the manualOnly record component.
    private final int
    The field for the maxAttempts record component.
    private final int
    The field for the maxTicks record component.
    private final int
    The field for the padding record component.
    private final boolean
    The field for the required record component.
    private final int
    The field for the requiredSuccesses record component.
    private final Rotation
    The field for the rotation record component.
    private final int
    The field for the setupTicks record component.
    private final boolean
    The field for the skyAccess record component.
    private final Identifier
    The field for the structure record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TestData(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 a TestData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the environment record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the manualOnly record component.
    <T> TestData<T>
     
    int
    Returns the value of the maxAttempts record component.
    int
    Returns the value of the maxTicks record component.
    int
    Returns the value of the padding record component.
    boolean
    Returns the value of the required record component.
    int
    Returns the value of the requiredSuccesses record component.
    Returns the value of the rotation record component.
    int
    Returns the value of the setupTicks record component.
    boolean
    Returns the value of the skyAccess record component.
    Returns the value of the structure record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • environment

      private final EnvironmentType environment
      The field for the environment record component.
    • structure

      private final Identifier structure
      The field for the structure record component.
    • maxTicks

      private final int maxTicks
      The field for the maxTicks record component.
    • setupTicks

      private final int setupTicks
      The field for the setupTicks record component.
    • required

      private final boolean required
      The field for the required record component.
    • rotation

      private final Rotation rotation
      The field for the rotation record component.
    • manualOnly

      private final boolean manualOnly
      The field for the manualOnly record component.
    • maxAttempts

      private final int maxAttempts
      The field for the maxAttempts record component.
    • requiredSuccesses

      private final int requiredSuccesses
      The field for the requiredSuccesses record component.
    • skyAccess

      private final boolean skyAccess
      The field for the skyAccess record component.
    • padding

      private final int padding
      The field for the padding record 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 a TestData record class.
      Parameters:
      environment - the value for the environment record component
      structure - the value for the structure record component
      maxTicks - the value for the maxTicks record component
      setupTicks - the value for the setupTicks record component
      required - the value for the required record component
      rotation - the value for the rotation record component
      manualOnly - the value for the manualOnly record component
      maxAttempts - the value for the maxAttempts record component
      requiredSuccesses - the value for the requiredSuccesses record component
      skyAccess - the value for the skyAccess record component
      padding - the value for the padding record component
  • Method Details

    • map

      public <T> TestData<T> map(Function<EnvironmentType, T> mapper)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • environment

      public EnvironmentType environment()
      Returns the value of the environment record component.
      Returns:
      the value of the environment record component
    • structure

      public Identifier structure()
      Returns the value of the structure record component.
      Returns:
      the value of the structure record component
    • maxTicks

      public int maxTicks()
      Returns the value of the maxTicks record component.
      Returns:
      the value of the maxTicks record component
    • setupTicks

      public int setupTicks()
      Returns the value of the setupTicks record component.
      Returns:
      the value of the setupTicks record component
    • required

      public boolean required()
      Returns the value of the required record component.
      Returns:
      the value of the required record component
    • rotation

      public Rotation rotation()
      Returns the value of the rotation record component.
      Returns:
      the value of the rotation record component
    • manualOnly

      public boolean manualOnly()
      Returns the value of the manualOnly record component.
      Returns:
      the value of the manualOnly record component
    • maxAttempts

      public int maxAttempts()
      Returns the value of the maxAttempts record component.
      Returns:
      the value of the maxAttempts record component
    • requiredSuccesses

      public int requiredSuccesses()
      Returns the value of the requiredSuccesses record component.
      Returns:
      the value of the requiredSuccesses record component
    • skyAccess

      public boolean skyAccess()
      Returns the value of the skyAccess record component.
      Returns:
      the value of the skyAccess record component
    • padding

      public int padding()
      Returns the value of the padding record component.
      Returns:
      the value of the padding record component