Projectile Interaction - TheComputerGeek2/MagicSpells GitHub Wiki

Note

Currently only spells of the same spell class can interact with each other.

Interactions are an interaction list defining what happens when the spell collides.

Before 4.0 Beta 14:

Interactions can only be configured in string form, following the format <interactSpell> <collisionSpell>. Example:

interactions:
    - otherProjectile lightningSpell

Since 4.0 Beta 14:

Interactions can either be in string or config form, the latter giving more control over the behaviour of the interaction.

String:

Follows format <interactSpellFilter> <collisionSpell>.

Config:

Option Description Type Default
with A spell filter determining which spells this spell may interact with. Spell Filter
collision-spell Sub-spell to cast on collision. Sub-spell
stop-causing Stop the spell that caused the interaction (this spell). Boolean true
stop-with Stop the spell that was interacted with. Boolean true
can-interact List of valid projectile casters this spell interacts with. Overrides allow-caster-interact on ParticleProjectileSpell if defined. Valid Target List

Example:

 interactions:
    # String-based
    - otherProjectile collisionSpell
    # Config-based:
    - with: otherProjectile
      collision-spell: collisionSpell
      can-interact: self
⚠️ **GitHub.com Fallback** ⚠️