java.lang.Object
java.lang.Enum<SpellRole>
johnsmith.enchantingoverhauled.api.enchantment.spellfield.SpellRole
All Implemented Interfaces:
Serializable, Comparable<SpellRole>, Constable, net.minecraft.util.StringRepresentable

public enum SpellRole extends Enum<SpellRole> implements net.minecraft.util.StringRepresentable
Defines the tactical combat role of an AiSpellField, its default SpellTarget, and its default CastType.
  • Enum Constant Details

  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<SpellRole> CODEC
      The serialization codec for encoding and decoding SpellRole values by name.
  • Method Details

    • values

      public static SpellRole[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SpellRole valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getDefaultTarget

      public SpellTarget getDefaultTarget()
      Retrieves the default SpellTarget associated with this tactical role.
      Returns:
      The default SpellTarget.
    • getDefaultCastType

      public CastType getDefaultCastType()
      Retrieves the default CastType associated with this tactical role.
      Returns:
      The default CastType.
    • getSerializedName

      @NotNull public @NotNull String getSerializedName()
      Retrieves the serialized string representation of this spell role.
      Specified by:
      getSerializedName in interface net.minecraft.util.StringRepresentable
      Returns:
      The serialized name string.