Skip to content

Projectile Spell

MomoPewpew edited this page Jul 28, 2023 · 11 revisions

Source Code

spell-class: ".instant.ProjectileSpell"

Description:

Projectile Spell that shoots a normal entity projectile.

Configuration:

Option Description Default Value
projectile-type The type of projectile. arrow
relative-offset Relative offset applied at the start location. "0,1.5,0"
tick-interval How often to play the particle effect and check hitboxes (in ticks) 1
spell-interval Casts the spell-on-tick each defined ticks 20
special-effect-interval How often to play the particle effects (in ticks) 0
rotation Rotation of the start direction in angles. 0
velocity The velocity of the projectile. 1
hit-radius How far from the center of the particle to look for entities to hit. 2
vertical-hit-radius How far vertically from the center of the particle to look for entities to hit. 2
vertical-spread Effectively the opposite of vertical accuracy. A higher number means less accuracy. 0
horizontal-spread Effectively the opposite of horizontal accuracy. A higher number means less accuracy. 0
gravity Should gravity be applied to the projectile? true
charged Should the wither skull be charged? false
stop-on-modifier-fail Whether the projectile should disappear if projectile-modifiers will fail true
max-duration The maximum duration this projectile is allowed to exist. 10
spell The default sub-spell to cast on hit. Must be a targeted spell that can hit the ground or an entity, depending on how the options above are set up. ""
spell-on-tick Sub-spell to cast when the projectile flies. Must be a targeted spell that can hit the ground, depending on how the options above are set up. ""
spell-on-hit-ground Sub-spell to cast when the projectile hits ground. Must be a targeted spell that can hit the ground, depending on how the options above are set up. ""
spell-on-hit-entity-location Sub-spell to cast when the projectile hits an entity, firing at the location the projectile hits the entity. For example, if the projectile hits the head of a zombie, the spell provided will be cast at the zombie's head. Must be a targeted spell that can hit the ground. ""
spell-on-modifier-fail Sub-spell to cast when the projectile's modifier list fails. Must be a targeted spell that can hit the ground, depending on how the options above are set up. (requires projectile-modifiers) ""
spell-after-duration Sub-spell to cast when the projectile reaches its max-duration. Must be a targeted spell that can hit the ground, depending on how the options above are set up. ""
projectile-modifiers Modifiers for the projectile. If the modifier checks won't pass, the projectile will stop flying. null

Example:

explosivearrow:
    spell-class: ".instant.ProjectileSpell"
    name: explosivearrow
    spell-icon: arrow
    description: Cause an explosion where an arrow lands
    cast-item: blaze_rod
    cooldown: 30
    projectile-type: arrow
    velocity: 1
    max-duration: 3
    spell: explode
    spell-on-hit-ground: explode
    cost:
        - mana 25
        - gunpowder 1
        - arrow 1
    str-cost: 25 mana, 1 gunpowder, and 1 arrow
    str-cast-self: You fire an explosive arrow.
Clone this wiki locally