Class SpellComponent.CastEntity
java.lang.Object
at.minecraftschurli.mods.arsmagicalegacy.api.spell.SpellPart
at.minecraftschurli.mods.arsmagicalegacy.api.spell.SpellComponent
at.minecraftschurli.mods.arsmagicalegacy.api.spell.SpellComponent.CastEntity
- Enclosing class:
SpellComponent
Represents a spell component that only affects entities.
-
Nested Class Summary
Nested classes/interfaces inherited from class SpellComponent
SpellComponent.CastBlock, SpellComponent.CastBoth, SpellComponent.CastEntity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncast(List<SpellModifier> modifiers, SpellCastContext context) Casts the part.abstract SpellComponentCastResultcastEntity(List<SpellModifier> modifiers, SpellCastContext context, net.minecraft.world.phys.EntityHitResult hitResult) Casts this part on an entity.voidspawnParticles(List<SpellModifier> modifiers, SpellCastContext context) Spawns particles for the part.Methods inherited from class SpellComponent
getStats, isComponent, isModifier, isPrimaryShape, isSecondaryShapeMethods inherited from class SpellPart
getData, getData, getDataComponentType, isShape
-
Constructor Details
-
CastEntity
-
-
Method Details
-
cast
Description copied from class:SpellComponentCasts the part.- Specified by:
castin classSpellComponent- Parameters:
modifiers- TheSpellModifiers to consider.context- TheSpellCastContextto use.- Returns:
- A
SpellComponentCastResultrepresenting the result of the cast.
-
spawnParticles
Description copied from class:SpellComponentSpawns particles for the part. May only be called on the client.- Overrides:
spawnParticlesin classSpellComponent- Parameters:
modifiers- TheSpellModifiers to consider.context- TheSpellCastContextto use.
-
castEntity
public abstract SpellComponentCastResult castEntity(List<SpellModifier> modifiers, SpellCastContext context, net.minecraft.world.phys.EntityHitResult hitResult) Casts this part on an entity.- Parameters:
modifiers- TheSpellModifiers to consider.context- TheSpellCastContextto use.hitResult- TheEntityHitResultof the spell cast. This is provided for convenience and will be the cast version ofSpellCastContext.hitResult().- Returns:
- A
SpellComponentCastResultrepresenting the result of the cast.
-