Skip to content
JasperLorelai edited this page Mar 21, 2022 · 18 revisions

Source Code

Projectile Spell that shoots a normal entity projectile.

Configuration:

Option Description Default Value
projectile-type The type of projectile. For more information, see below. 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 accurate. 0
horizontal-spread Effectively the opposite of horizontal accuracy. A higher number means less accurate. 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 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 The 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 The 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-modifier-fail The 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 The 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 Modifier list for the projectile, if modifier check wont pass, the projectile will stop flying. null

Projectile Types

  • Arrow
  • Dragonfireball
  • Egg
  • Enderpearl
  • Fireball
  • Fishhook
  • Largefireball
  • Lingeringpotion
  • Llamaspit
  • Shulkerbullet
  • Smallfireball
  • Snowball
  • Spectralarrow
  • Splashpotion
  • Thrownexpbottle
  • Thrownpotion
  • Tippedarrow
  • Trident
  • Witherskull

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