Class SpellModifier
java.lang.Object
at.minecraftschurli.mods.arsmagicalegacy.api.spell.SpellPart
at.minecraftschurli.mods.arsmagicalegacy.api.spell.SpellModifier
Represents a spell modifier. Spell modifiers cannot be cast, instead they are queried for their presence by other spell parts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetModifier(SpellStat stat) getStats()If the spell part is a modifier, returns theSpellStats the modifier modifies.final booleanfinal booleanfinal booleanfinal booleanMethods inherited from class SpellPart
getData, getData, getDataComponentType, isShape
-
Constructor Details
-
SpellModifier
- Parameters:
modifiers- A map ofSpellStats andSpellStatModifiers that this modifier represents.
-
-
Method Details
-
isPrimaryShape
public final boolean isPrimaryShape()- Specified by:
isPrimaryShapein classSpellPart- Returns:
- Whether the spell part is a primary shape.
-
isSecondaryShape
public final boolean isSecondaryShape()- Specified by:
isSecondaryShapein classSpellPart- Returns:
- Whether the spell part is a secondary shape.
-
isComponent
public final boolean isComponent()- Specified by:
isComponentin classSpellPart- Returns:
- Whether the spell part is a component.
-
isModifier
public final boolean isModifier()- Specified by:
isModifierin classSpellPart- Returns:
- Whether the spell part is a modifier.
-
getStats
-
getModifier
- Parameters:
stat- TheSpellStatto test for.- Returns:
- The associated
SpellStatModifier.
-