Record Class ResearchStage

java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.research.ResearchStage

public record ResearchStage(List<ResearchObjective> objectives, List<InteractionResult> result, List<DescribableResource> resultSprites) extends Record
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<ResearchStage> CODEC
  • Constructor Details

    • ResearchStage

      public ResearchStage(List<ResearchObjective> objectives, List<InteractionResult> result, List<DescribableResource> resultSprites)
      Creates an instance of a ResearchStage record class.
      Parameters:
      objectives - the value for the objectives record component
      result - the value for the result record component
      resultSprites - the value for the resultSprites record component
  • Method Details

    • read

      public static ResearchStage read(net.minecraft.network.FriendlyByteBuf buffer)
    • write

      public void write(net.minecraft.network.FriendlyByteBuf buffer)
    • builder

      public static ResearchStage.Builder builder()
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • objectives

      public List<ResearchObjective> objectives()
      Returns the value of the objectives record component.
      Returns:
      the value of the objectives record component
    • result

      public List<InteractionResult> result()
      Returns the value of the result record component.
      Returns:
      the value of the result record component
    • resultSprites

      public List<DescribableResource> resultSprites()
      Returns the value of the resultSprites record component.
      Returns:
      the value of the resultSprites record component