Record Class SkillPoint
java.lang.Object
java.lang.Record
at.minecraftschurli.mods.arsmagicalegacy.api.magic.SkillPoint
- Record Components:
color- The color (RGB) of the skill point.minEarnLevel- The level from which on the skill point will be awarded.levelsForPoint- The amount of levels required to get the next skill point.
Represents a skill point.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.core.Holder<SkillPoint>> static final com.mojang.serialization.Codec<SkillPoint> -
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.static net.minecraft.network.chat.MutableComponentgetName(net.minecraft.core.Holder<SkillPoint> holder) 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.
-
Field Details
-
DIRECT_CODEC
-
CODEC
-
-
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
-
getName
public static net.minecraft.network.chat.MutableComponent getName(net.minecraft.core.Holder<SkillPoint> holder) - Parameters:
holder- The skill pointHolderto query.- Returns:
- The display name of the given skill point.
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
color
-
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
-