Class PrimarySpellShape
java.lang.Object
at.minecraftschurli.mods.arsmagicalegacy.api.spell.SpellPart
at.minecraftschurli.mods.arsmagicalegacy.api.spell.PrimarySpellShape
Represents a primary spell shape. Primary shapes must be at the start of a
SpellShapeGroup.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract SpellCastResultcast(List<SpellModifier> modifiers, SpellCastContext context) Casts this part.getStats()If the spell part is a modifier, returns theSpellStats the modifier modifies.final booleanbooleanfinal booleanfinal booleanfinal booleanMethods inherited from class SpellPart
getData, getData, getDataComponentType, isShape
-
Constructor Details
-
PrimarySpellShape
-
-
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
-
isContinuous
public boolean isContinuous()- Returns:
- Whether this part is continuous, i.e., can be cast by holding down the spell.
-
cast
Casts this part. Note thatSpellCastContext.directEntity()andSpellCastContext.hitResult()are guaranteed to return null here.- Parameters:
modifiers- TheSpellModifiers to consider.context- TheSpellCastContextto use.- Returns:
- A
SpellCastResultrepresenting the result of the cast. - See Also:
-