Record Class SkillPoint
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.util.ITranslatable
ITranslatable.WithDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<SkillPoint>>static final String -
Constructor Summary
ConstructorsConstructorDescriptionSkillPoint(int color, int minEarnLevel, int levelsForPoint) Creates an instance of aSkillPointrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocationgetId()getType()final inthashCode()Returns a hash code value for this object.intReturns the value of thelevelsForPointrecord component.intReturns the value of theminEarnLevelrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.util.ITranslatable
getDisplayName, getDisplayName, getId, getTranslationKey, getTranslationKey
-
Field Details
-
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 aSkillPointrecord class.- Parameters:
color- the value for thecolorrecord componentminEarnLevel- the value for theminEarnLevelrecord componentlevelsForPoint- the value for thelevelsForPointrecord component
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceITranslatable- Returns:
- The type of this object, for example "block" or "item".
-
getId
public net.minecraft.resources.ResourceLocation getId()- Specified by:
getIdin interfaceITranslatable- Returns:
- The id of this object.
-
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. -
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. -
equals
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 '=='. -
color
public int color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
minEarnLevel
public int minEarnLevel()Returns the value of theminEarnLevelrecord component.- Returns:
- the value of the
minEarnLevelrecord component
-
levelsForPoint
public int levelsForPoint()Returns the value of thelevelsForPointrecord component.- Returns:
- the value of the
levelsForPointrecord component
-