Class SpellPart
java.lang.Object
at.minecraftschurli.mods.arsmagicalegacy.api.spell.SpellPart
- Direct Known Subclasses:
PrimarySpellShape, SecondarySpellShape, SpellComponent, SpellModifier
public abstract sealed class SpellPart
extends Object
permits PrimarySpellShape, SecondarySpellShape, SpellComponent, SpellModifier
Represents a spell part.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetData(net.minecraft.core.HolderLookup.Provider registries) getData(net.minecraft.core.RegistryAccess registryAccess) @Nullable net.minecraft.core.component.DataComponentType<?> getStats()If the spell part is a modifier, returns theSpellStats the modifier modifies.abstract booleanabstract booleanabstract booleanabstract booleanfinal booleanisShape()
-
Constructor Details
-
SpellPart
public SpellPart()
-
-
Method Details
-
isShape
public final boolean isShape()- Returns:
- Whether the spell part is a shape (primary or secondary).
-
isPrimaryShape
public abstract boolean isPrimaryShape()- Returns:
- Whether the spell part is a primary shape.
-
isSecondaryShape
public abstract boolean isSecondaryShape()- Returns:
- Whether the spell part is a secondary shape.
-
isComponent
public abstract boolean isComponent()- Returns:
- Whether the spell part is a component.
-
isModifier
public abstract boolean isModifier()- Returns:
- Whether the spell part is a modifier.
-
getStats
-
getData
- Parameters:
registryAccess- TheRegistryAccessto use.- Returns:
- The spell part's datapack-defined data.
-
getData
- Parameters:
registries- TheHolderLookup.Providerto use.- Returns:
- The spell part's datapack-defined data.
-
getDataComponentType
public @Nullable net.minecraft.core.component.DataComponentType<?> getDataComponentType()- Returns:
- The
DataComponentTypethe spell part uses for additional data storage, or null if it does not use aDataComponentType.
-