java.lang.Object
java.lang.Record
com.github.minecraftschurlimods.arsmagicalegacy.api.skill.SkillPoint
Record Components:
color - The color for this skill point.
minEarnLevel - The amount of levels needed to get the next skill point.
levelsForPoint - The minimum amount of levels needed to get this skill point.
All Implemented Interfaces:
ITranslatable

public record SkillPoint(int color, int minEarnLevel, int levelsForPoint) extends Record implements ITranslatable
  • Field Details

    • SKILL_POINT

      public static final String SKILL_POINT
      See Also:
    • REGISTRY_KEY

      public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<SkillPoint>> REGISTRY_KEY
  • Constructor Details

    • SkillPoint

      public SkillPoint(int color, int minEarnLevel, int levelsForPoint)
      Creates an instance of a SkillPoint record class.
      Parameters:
      color - the value for the color record component
      minEarnLevel - the value for the minEarnLevel record component
      levelsForPoint - the value for the levelsForPoint record component
  • Method Details

    • getType

      public String getType()
      Specified by:
      getType in interface ITranslatable
      Returns:
      The type of this object, for example "block" or "item".
    • getId

      public net.minecraft.resources.ResourceLocation getId()
      Specified by:
      getId in interface ITranslatable
      Returns:
      The id of this object.
    • 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 '=='.
      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.
    • color

      public int color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component
    • minEarnLevel

      public int minEarnLevel()
      Returns the value of the minEarnLevel record component.
      Returns:
      the value of the minEarnLevel record component
    • levelsForPoint

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