Record Class ResearchTier

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

public record ResearchTier(net.minecraft.network.chat.Component name, Color mainColor, Color accentColor) extends Record
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<ResearchTier>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResearchTier(net.minecraft.network.chat.Component name, Color mainColor, Color accentColor)
    Creates an instance of a ResearchTier record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the accentColor record component.
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the mainColor record component.
    net.minecraft.network.chat.Component
    Returns the value of the name record component.
     
    read(net.minecraft.network.FriendlyByteBuf buffer)
     
    final String
    Returns a string representation of this record class.
    void
    write(net.minecraft.network.FriendlyByteBuf buffer)
     

    Methods inherited from class java.lang.Object

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

    • CODEC

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

    • ResearchTier

      public ResearchTier(net.minecraft.network.chat.Component name, Color mainColor, Color accentColor)
      Creates an instance of a ResearchTier record class.
      Parameters:
      name - the value for the name record component
      mainColor - the value for the mainColor record component
      accentColor - the value for the accentColor record component
  • Method Details

    • write

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

      public static ResearchTier read(net.minecraft.network.FriendlyByteBuf buffer)
    • none

      public static ResearchTier none()
    • builder

      public static ResearchTier.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.
    • name

      public net.minecraft.network.chat.Component name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • mainColor

      public Color mainColor()
      Returns the value of the mainColor record component.
      Returns:
      the value of the mainColor record component
    • accentColor

      public Color accentColor()
      Returns the value of the accentColor record component.
      Returns:
      the value of the accentColor record component