Record Class StarterOption

java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.config.starter.StarterOption

public record StarterOption(String labelOn, String labelOff, int width, int x, int y, PokemonSpecification spec) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    StarterOption(com.google.gson.JsonObject json, com.google.gson.JsonDeserializationContext ctx)
     
    StarterOption(String labelOn, String labelOff, int width, int x, int y, PokemonSpecification spec)
    Creates an instance of a StarterOption record class.
    StarterOption(net.minecraft.network.FriendlyByteBuf buf)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    label(boolean on)
     
    Returns the value of the labelOff record component.
    Returns the value of the labelOn record component.
    Returns the value of the spec record component.
    void
    toBuffer(net.minecraft.network.FriendlyByteBuf buf)
     
    com.google.gson.JsonObject
    toJson(com.google.gson.JsonSerializationContext ctx)
     
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the width record component.
    int
    x()
    Returns the value of the x record component.
    int
    y()
    Returns the value of the y record component.

    Methods inherited from class java.lang.Object

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

    • StarterOption

      public StarterOption(com.google.gson.JsonObject json, com.google.gson.JsonDeserializationContext ctx)
    • StarterOption

      public StarterOption(net.minecraft.network.FriendlyByteBuf buf)
    • StarterOption

      public StarterOption(String labelOn, String labelOff, int width, int x, int y, PokemonSpecification spec)
      Creates an instance of a StarterOption record class.
      Parameters:
      labelOn - the value for the labelOn record component
      labelOff - the value for the labelOff record component
      width - the value for the width record component
      x - the value for the x record component
      y - the value for the y record component
      spec - the value for the spec record component
  • Method Details

    • toJson

      public com.google.gson.JsonObject toJson(com.google.gson.JsonSerializationContext ctx)
    • toBuffer

      public void toBuffer(net.minecraft.network.FriendlyByteBuf buf)
    • label

      public String label(boolean on)
    • 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.
    • labelOn

      public String labelOn()
      Returns the value of the labelOn record component.
      Returns:
      the value of the labelOn record component
    • labelOff

      public String labelOff()
      Returns the value of the labelOff record component.
      Returns:
      the value of the labelOff record component
    • width

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • x

      public int x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public int y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component
    • spec

      public PokemonSpecification spec()
      Returns the value of the spec record component.
      Returns:
      the value of the spec record component