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 Details

    • environment

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

      private final ResourceLocation 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.
    • 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 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
  • Method Details

    • map

      public <T> TestData<T> map(Function<EnvironmentType,T> p_397000_)
    • 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 '=='.
      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 ResourceLocation 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