Record Class Skill
java.lang.Object
java.lang.Record
com.github.minecraftschurlimods.arsmagicalegacy.api.skill.Skill
- All Implemented Interfaces:
ITranslatable,ITranslatable.WithDescription
public record Skill(Set<net.minecraft.resources.ResourceLocation> parents, Map<net.minecraft.resources.ResourceLocation,Integer> cost, net.minecraft.resources.ResourceLocation occulusTab, int x, int y, boolean hidden)
extends Record
implements ITranslatable.WithDescription
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.util.ITranslatable
ITranslatable.WithDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Skill>static final com.mojang.serialization.Codec<net.minecraft.core.HolderSet<Skill>>static final com.mojang.serialization.Codec<net.minecraft.core.Holder<Skill>>static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<Skill>>static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncost()Returns the value of thecostrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocationgetId(net.minecraft.core.RegistryAccess access) getType()final inthashCode()Returns a hash code value for this object.booleanhidden()Returns the value of thehiddenrecord component.net.minecraft.resources.ResourceLocationReturns the value of theocculusTabrecord component.Set<net.minecraft.resources.ResourceLocation>parents()Returns the value of theparentsrecord 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.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.util.ITranslatable
getId, getTranslationKey, getTranslationKeyMethods inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.util.ITranslatable.WithDescription
getDescription, getDescription, getDescriptionTranslationKey, getDescriptionTranslationKey, getDisplayName, getDisplayName, getNameTranslationKey, getNameTranslationKey
-
Field Details
-
Constructor Details
-
Skill
public Skill(Set<net.minecraft.resources.ResourceLocation> parents, Map<net.minecraft.resources.ResourceLocation, Integer> cost, net.minecraft.resources.ResourceLocation occulusTab, int x, int y, boolean hidden) Creates an instance of aSkillrecord class.- Parameters:
parents- the value for theparentsrecord componentcost- the value for thecostrecord componentocculusTab- the value for theocculusTabrecord componentx- the value for thexrecord componenty- the value for theyrecord componenthidden- the value for thehiddenrecord component
-
-
Method Details
-
parents
Returns the value of theparentsrecord component.- Returns:
- the value of the
parentsrecord component
-
cost
Returns the value of thecostrecord component.- Returns:
- the value of the
costrecord component
-
getId
public net.minecraft.resources.ResourceLocation getId(net.minecraft.core.RegistryAccess access) - Specified by:
getIdin interfaceITranslatable- Returns:
- The id of this object.
-
getType
- Specified by:
getTypein interfaceITranslatable- Returns:
- The type of this object, for example "block" or "item".
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
occulusTab
public net.minecraft.resources.ResourceLocation occulusTab()Returns the value of theocculusTabrecord component.- Returns:
- the value of the
occulusTabrecord component
-
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-