Interface ISpellComponent
- All Superinterfaces:
ISpellPart
Base interface for spell components
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.spell.ISpellPart
ISpellPart.SpellPartType -
Field Summary
Fields inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.spell.ISpellPart
REGISTRY_KEY -
Method Summary
Modifier and TypeMethodDescriptiondefault ISpellPart.SpellPartTypegetType()invoke(ISpell spell, net.minecraft.world.entity.LivingEntity caster, net.minecraft.world.level.Level level, List<ISpellModifier> modifiers, net.minecraft.world.phys.BlockHitResult target, int index, int ticksUsed) Invoke this spell component for a block.invoke(ISpell spell, net.minecraft.world.entity.LivingEntity caster, net.minecraft.world.level.Level level, List<ISpellModifier> modifiers, net.minecraft.world.phys.EntityHitResult target, int index, int ticksUsed) Invoke this spell component for an entity.Methods inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.spell.ISpellPart
getId
-
Method Details
-
invoke
@OverrideOnly SpellCastResult invoke(ISpell spell, net.minecraft.world.entity.LivingEntity caster, net.minecraft.world.level.Level level, List<ISpellModifier> modifiers, net.minecraft.world.phys.EntityHitResult target, int index, int ticksUsed) Invoke this spell component for an entity. Called only on the server.- Parameters:
spell- The spell being cast.caster- The caster of the spell.level- The level the spell is being cast in.modifiers- The modifiers modifying this component.target- The target.index- The index of this spell component in the spell execution stack.ticksUsed- The amount of ticks the spell is being cast for.- Returns:
- The spell cast result (success if anything was affected).
-
invoke
@OverrideOnly SpellCastResult invoke(ISpell spell, net.minecraft.world.entity.LivingEntity caster, net.minecraft.world.level.Level level, List<ISpellModifier> modifiers, net.minecraft.world.phys.BlockHitResult target, int index, int ticksUsed) Invoke this spell component for a block. Called only on the server.- Parameters:
spell- The spell being cast.caster- The caster of the spell.level- The level the spell is being cast in.modifiers- The modifiers modifying this component.target- The target.index- The index of this spell component in the spell execution stack.ticksUsed- The amount of ticks the spell is being cast for.- Returns:
- The spell cast result (success if anything was affected).
-
getStatsUsed
Set<ISpellPartStat> getStatsUsed()- Returns:
- The stats used by this spell part.
-
getType
- Specified by:
getTypein interfaceISpellPart- Returns:
- The type of this spell part.
-