Class SpellComponent.CastBlock
java.lang.Object
at.minecraftschurli.mods.arsmagicalegacy.api.spell.SpellPart
at.minecraftschurli.mods.arsmagicalegacy.api.spell.SpellComponent
at.minecraftschurli.mods.arsmagicalegacy.api.spell.SpellComponent.CastBlock
- Enclosing class:
SpellComponent
Represents a spell component that only affects blocks.
-
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 SpellComponentCastResultcastBlock(List<SpellModifier> modifiers, SpellCastContext context, net.minecraft.world.phys.BlockHitResult hitResult) Casts this part on a block.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
-
CastBlock
-
-
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.
-
castBlock
public abstract SpellComponentCastResult castBlock(List<SpellModifier> modifiers, SpellCastContext context, net.minecraft.world.phys.BlockHitResult hitResult) Casts this part on a block.- Parameters:
modifiers- TheSpellModifiers to consider.context- TheSpellCastContextto use.hitResult- TheBlockHitResultof the spell cast. This is provided for convenience and will be the cast version ofSpellCastContext.hitResult().- Returns:
- A
SpellComponentCastResultrepresenting the result of the cast.
-