Record Class Skill
java.lang.Object
java.lang.Record
at.minecraftschurli.mods.arsmagicalegacy.api.magic.Skill
- Record Components:
parents- AListof parentSkillHolders.cost- The cost of the skill. If absent, the skill has no cost.tab- TheOcculusTabthe skill resides in.x- The x position of the skill.y- The y position of the skill.- Whether the skill is hidden. Hidden skills will only show when learned through means other than within the occulus, e.g. via command.
public record Skill(List<net.minecraft.core.Holder<Skill>> parents, Optional<net.minecraft.core.Holder<SkillPoint>> cost, net.minecraft.core.Holder<OcculusTab> tab, int x, int y, boolean hidden)
extends Record
Represents a skill.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSkill(List<net.minecraft.core.Holder<Skill>> parents, Optional<net.minecraft.core.Holder<SkillPoint>> cost, net.minecraft.core.Holder<OcculusTab> tab, int x, int y, boolean hidden) Creates an instance of aSkillrecord class. -
Method Summary
Modifier and TypeMethodDescriptionOptional<net.minecraft.core.Holder<SkillPoint>> cost()Returns the value of thecostrecord component.final booleanIndicates whether some other object is "equal to" this one.static net.minecraft.network.chat.MutableComponentgetDescription(net.minecraft.core.Holder<Skill> holder) static net.minecraft.network.chat.MutableComponentfinal inthashCode()Returns a hash code value for this object.booleanhidden()Returns the value of thehiddenrecord component.parents()Returns the value of theparentsrecord component.net.minecraft.core.Holder<OcculusTab> tab()Returns the value of thetabrecord component.final StringtoString()Returns a string representation of this record class.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Field Details
-
DIRECT_CODEC
-
CODEC
-
-
Constructor Details
-
Skill
public Skill(List<net.minecraft.core.Holder<Skill>> parents, Optional<net.minecraft.core.Holder<SkillPoint>> cost, net.minecraft.core.Holder<OcculusTab> tab, int x, int y, boolean hidden) Creates an instance of aSkillrecord class.
-
-
Method Details
-
getName
public static net.minecraft.network.chat.MutableComponent getName(net.minecraft.core.Holder<Skill> holder) - Parameters:
holder- The skillHolderto query.- Returns:
- The display name of the given skill.
-
getDescription
public static net.minecraft.network.chat.MutableComponent getDescription(net.minecraft.core.Holder<Skill> holder) - Parameters:
holder- The skillHolderto query.- Returns:
- The description of the given skill.
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
parents
-
cost
-
tab
-
x
-
y
-