Enum Class SpellRole
- All Implemented Interfaces:
Serializable,Comparable<SpellRole>,Constable,net.minecraft.util.StringRepresentable
Defines the tactical combat role of an
AiSpellField, its default SpellTarget,
and its default CastType.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentable
net.minecraft.util.StringRepresentable.EnumCodec<E extends Enum<E> & net.minecraft.util.StringRepresentable>, net.minecraft.util.StringRepresentable.StringRepresentableCodec<S extends net.minecraft.util.StringRepresentable> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDefensive role aimed at warding, shielding, or creating decoys for the caster (defaults toSpellTarget.SELFandCastType.DIRECT).Offensive role aimed at damaging,debuffing, or displacing hostile targets (defaults toSpellTarget.HOSTILEandCastType.PROJECTILE).Supportive role aimed at healing or buffing allies or hindering enemies (defaults toSpellTarget.ALLYandCastType.DIRECT). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SpellRole> The serialization codec for encoding and decodingSpellRolevalues by name.Fields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the defaultCastTypeassociated with this tactical role.Retrieves the defaultSpellTargetassociated with this tactical role.@NotNull StringRetrieves the serialized string representation of this spell role.static SpellRoleReturns the enum constant of this class with the specified name.static SpellRole[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OFFENSIVE
Offensive role aimed at damaging,debuffing, or displacing hostile targets (defaults toSpellTarget.HOSTILEandCastType.PROJECTILE). -
DEFENSIVE
Defensive role aimed at warding, shielding, or creating decoys for the caster (defaults toSpellTarget.SELFandCastType.DIRECT). -
SUPPORTIVE
Supportive role aimed at healing or buffing allies or hindering enemies (defaults toSpellTarget.ALLYandCastType.DIRECT).
-
-
Field Details
-
CODEC
The serialization codec for encoding and decodingSpellRolevalues by name.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getDefaultTarget
Retrieves the defaultSpellTargetassociated with this tactical role.- Returns:
- The default
SpellTarget.
-
getDefaultCastType
Retrieves the defaultCastTypeassociated with this tactical role.- Returns:
- The default
CastType.
-
getSerializedName
Retrieves the serialized string representation of this spell role.- Specified by:
getSerializedNamein interfacenet.minecraft.util.StringRepresentable- Returns:
- The serialized name string.
-