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
  • Field Details

    • SKILL

      public static final String SKILL
      See Also:
    • REGISTRY_KEY

      public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<Skill>> REGISTRY_KEY
    • DIRECT_CODEC

      public static final com.mojang.serialization.Codec<Skill> DIRECT_CODEC
    • REFERENCE_CODEC

      public static final com.mojang.serialization.Codec<net.minecraft.core.Holder<Skill>> REFERENCE_CODEC
    • LIST_CODEC

      public static final com.mojang.serialization.Codec<net.minecraft.core.HolderSet<Skill>> LIST_CODEC
  • 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 a Skill record class.
      Parameters:
      parents - the value for the parents record component
      cost - the value for the cost record component
      occulusTab - the value for the occulusTab record component
      x - the value for the x record component
      y - the value for the y record component
      hidden - the value for the hidden record component
  • Method Details

    • parents

      public Set<net.minecraft.resources.ResourceLocation> parents()
      Returns the value of the parents record component.
      Returns:
      the value of the parents record component
    • cost

      public Map<net.minecraft.resources.ResourceLocation,Integer> cost()
      Returns the value of the cost record component.
      Returns:
      the value of the cost record component
    • getId

      public net.minecraft.resources.ResourceLocation getId(net.minecraft.core.RegistryAccess access)
      Specified by:
      getId in interface ITranslatable
      Returns:
      The id of this object.
    • getType

      public String getType()
      Specified by:
      getType in interface ITranslatable
      Returns:
      The type of this object, for example "block" or "item".
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • occulusTab

      public net.minecraft.resources.ResourceLocation occulusTab()
      Returns the value of the occulusTab record component.
      Returns:
      the value of the occulusTab record component
    • x

      public int x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public int y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component
    • hidden

      public boolean hidden()
      Returns the value of the hidden record component.
      Returns:
      the value of the hidden record component