HomingProjectileSpell - TheComputerGeek2/MagicSpells GitHub Wiki
spell-class: ".targeted.HomingProjectileSpell"
targeting
cast argument values:
Value | Supported |
---|---|
entity |
true |
location |
true |
entity_from_location |
false |
Spell Effect Positions:
delayed
- Plays the effect at the missile's location when the missile ends.special
- Plays the effect at the missile's location as it travels, everyspecial-effect-interval
.projectile
- Plays the effect at the missile's position as it travels, everytick-interval
.casterprojectile
- Plays the effect from the caster towards the missile's location.
Description:
A targeted spell that shoots a homing missile made of a projectile.
Configuration:
Since 4.0 Beta 13 some of these options support dynamic values through numeric or string expressions.
Option | Description | Type | Default | Supported expressions |
---|---|---|---|---|
projectile-type |
The type of projectile. | String | "arrow" |
true |
arrow-color |
Since 4.0 Beta 14. Color of potion particles as if the error was tipped. | Color | true |
|
relative-offset |
Relative offset applied at the start location. | Vector | "0.5,0.5,0" |
true |
target-relative-offset |
Relative offset applied at the target location. | Vector | "0.5,0.5,0" |
true |
tick-interval |
Defines (in server ticks) how often the missile ticks to check modifiers, check hitboxes, play effects, etc. | Integer | 1 |
true |
spell-interval |
Used with the hit-air-during option, casts the spell-on-hit-air each defined interval. Note that this interval is every tick-interval * spell-interval ticks. |
Integer | 20 |
true |
special-effect-interval |
Defines how often to play the particle effects. Note that this interval is every tick-interval * special-effect-interval ticks. |
Integer | 0 |
true |
intermediate-special-effect-locations |
How often to play the particle effects between travelled locations (in ticks) | Integer | 0 |
true |
velocity |
The velocity of the missile. | Float | 1 |
true |
power-affects-velocity |
Since 4.0 Beta 13. | Boolean | true |
true |
hit-radius |
How far from the center of the missile to look for entities to hit. | Float | 2 |
true |
vertical-hit-radius |
How far vertically from the center of the missile to look for entities to hit. | Float | 2 |
true |
visible |
Since 4.0 Beta 14. Toggles projectile's visibility by default. | Boolean | true |
true |
charged |
Since 4.0 Beta 14. Set whether or not the wither skull is charged. | Boolean | false |
true |
incendiary |
Since 4.0 Beta 14. Set whether or not this explosive's explosion causes fire. Applies to these following projectile types. | Boolean | false |
true |
stop-on-modifier-fail |
Whether the missile should disappear if homing-modifiers will fail |
Boolean | true |
true |
max-duration |
The maximum duration this missile is allowed to exist. (in seconds) | Double | 20 |
true |
spell |
The default sub-spell to cast on hit. It 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-hit-air |
Sub-spell to cast when it reaches max distance. It must be a targeted spell that can hit the ground or an entity, depending on how the options above are set up. (requires spell-interval ) |
String | false |
|
projectile-name |
Name of the projectile | Rich Text | true |
|
spell-on-hit-ground |
Sub-spell to cast when the missile hits ground. It must be a targeted spell that can hit the ground, depending on how the options above are set up. | String | false |
|
spell-on-modifier-fail |
Sub-spell to cast when the missile's modifier list fails. It must be a targeted spell that can hit the ground, depending on how the options above are set up. (requires homing-modifiers ) |
String | false |
|
spell-after-duration |
Sub-spell to cast when the missile reaches its max-duration. It must be a targeted spell that can hit the ground, depending on how the options above are set up. | String | false |
|
homing-modifiers |
Modifiers for the missile, if the modifier check won't pass, the missile will stop flying. | String List | false |
Example:
Homing-Projectile:
spell-class: ".targeted.HomingProjectileSpell"
name: "Homing Projectile"
range: 100
cooldown: 10
cast-item: bone
permission-name: homing_missile
projectile-type: enderpearl
projectile-name: "&e&lEnderPearl"
velocity: 0.75
max-duration: 10
hit-radius: 2
vertical-hit-radius: 2
tick-interval: 1
special-effect-interval: 1
relative-offset: 1,1,0
target-relative-offset: 0,1,0
can-target: players,nonplayers
spell: DMG_HOMING_PROJECTILE
effects:
eff1:
position: target
effect: particles
height-offset: 1
particle-name: explosion_large
horiz-spread: 0.25
vert-spread: 0.25
speed: 0
count: 5
eff2:
position: special
effect: particles
particle-name: redstone
color: 000000
horiz-spread: 0.1
vert-spread: 0.1
count: 10
DMG_HOMING_PROJECTILE:
spell-class: ".targeted.PainSpell"
helper-spell: true
permission-name: homing_missile
damage: 4
ignore-armor: true
check-plugins: true
can-target: players,nonplayers