Skip to content
JasperLorelai edited this page May 19, 2024 · 18 revisions

Source Code

spell-class: ".instant.ProjectileSpell"
Value Supported
entity false
location true
entity_from_location false
  • delayed - Plays the effect at the projectile's location when the spell ends.
  • special - Plays the effect at the projectile's location during flight, every special-effect-interval.
  • projectile - Plays the effect at the projectile's position as it travels, every tick-interval. On this spell, this position only works for EffectLib effects and entity effects.
  • casterprojectile - Plays the effect from the caster towards the projectile's location.

Description:

Projectile Spell that shoots a normal entity projectile.

Configuration:

Since 4.0 Beta 13 some of these options support dynamic values through numeric or string expressions.

Option Description Type Default Supports expressions
projectile-type The type of projectile. String arrow true
projectile-name Rich Text true
relative-offset Relative offset applied at the start location. Vector "0,1.5,0" true
effect-offset Since 4.0 Beta 13. Offset for the effects from the projectile. Vector "0,0,0" true
tick-interval Defines how often (in server ticks) the projectile ticks to check hitboxes, modifiers, play effects, etc. Integer 1 true
spell-interval Casts the spell-on-tick each defined interval. Note that one interval of this passes every tick-interval * spell-interval ticks. Integer 20 true
special-effect-interval How often to play the special effect. Note that one interval of this passes every tick-interval * special-effect-interval ticks. Integer 0 true
intermediate-effects Since 4.0 Beta 13. Defines how often in ticks to play spell effects between travelled locations. Integer 0 true
intermediate-hitboxes Since 4.0 Beta 13. Defines how often it ticks to check hitboxes between travelled locations. Integer 0 true
rotation Rotation of the start direction in angles. Float 0 true
velocity The velocity of the projectile. Float 1 true
hit-radius How far from the center of the particle to look for entities to hit. Float 2 true
vertical-hit-radius How far vertically from the center of the particle to look for entities to hit. Float 2 true
vertical-spread Effectively the opposite of vertical accuracy. A higher number means less accuracy. Float 0 true
horizontal-spread Effectively the opposite of horizontal accuracy. A higher number means less accuracy. Float 0 true
visible Since 4.0 Beta 13. Toggles projectile's visibility by default. Boolean true true
gravity Should gravity be applied to the projectile? Boolean true true
charged Set whether or not the wither skull is charged. Boolean false true
incendiary Set whether or not this explosive's explosion causes fire. Applies to these following projectile types. Boolean false true
check-plugins Alerts other plugins about this projectile moving. Boolean true true
stop-on-modifier-fail Whether the projectile should disappear if projectile-modifiers will fail Boolean true true
max-duration The maximum duration this projectile is allowed to exist. Double 10 true
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. String false
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. String false
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. String false
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. String false
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) String false
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. String false
arrow-color Since 4.0 Beta 14. Color of potion particles as if the error was tipped. Color true
projectile-modifiers Modifiers for the projectile. If the modifier checks won't pass, the projectile will stop flying. String List false

Example:

explosivearrow:
    spell-class: ".instant.ProjectileSpell"
    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