Skip to content

ItemProjectileSpell

MomoPewpew edited this page Dec 9, 2023 · 13 revisions

Source Code

spell-class: ".instant.ItemProjectileSpell"

Description:

A spell throws an item like a projectile, for example, throwing a block of ice as a projectile.

Configuration:

Option Description Default Value
item Type of the item. Supports Magic Items and Cast Items format. iron_sword
spell-delay Delay before casting the spell-on-delay. 40
pickup-delay Delay before entities are able to pick up the item. 100
remove-delay Delay before the item is removed. 100
tick-interval How often to play the particle effect and check hitboxes. It will check every X ticks. 1
spell-interval Interval between casting spell-on-tick. 2
item-name-delay Delay before applying the name to the item. 10
special-effect-interval Interval between playing effects. 2
entity-hit-delay Amount of ticks before the hit-radius is at its full size. In all ticks before that, the hit-radius will be treated as 10 time smaller. 0
speed Speed the projectile launches at. 1
y-offset From what y coordinate, relative to the caster, the projectile launches from. 0
hit-radius The hit-radius of the projectile. 1
vert-speed How fast upwards the projectile is launched. 0
vertical-hit-radius The vertical-hit-radius of the projectile. 1.5
rotation-offset Turns the start location around a specified angle. 0
stop-on-hit-ground Whether the projectile should stop when it hits ground. true
gravity Whether or not the item eventually falls to the ground. true
relative-offset Relative offset applied at the start location. "0,0,0"
item-name Name of the item. null
spell-on-tick Sub-spell to cast when the projectile continues flying. ""
spell-on-delay Sub-spell to cast after a delay. ""
spell-on-hit-entity Sub-spell to cast when the projectile hits an entity. ""
spell-on-hit-ground Sub-spell to cast when the projectile hits ground. ""

Example:

itemprojectilepainspell:
    spell-class: ".targeted.PainSpell"
    range: 5
    damage: 6
itemprojectilefailspell:
    spell-class: ".instant.DummySpell"  
itemprojectilespell:
    spell-class: ".instant.ItemProjectileSpell"
    speed: 1
    vert-speed: 0 
    hit-radius: 1
    y-offset: 0
    spell-on-hit-entity: itemprojectilepainspell
    spell-on-hit-ground: itemprojectilefailspell
    item: iron_sword
Clone this wiki locally