BeamSpell - MomoPewpew/MagicSpells GitHub Wiki
Source Code
spell-class: ".instant.BeamSpell"
Description:
Instant spell: A ranged mechanic which shoots in a line that travels instantly to its end destination.
General Configuration:
| Option |
Description |
Default Value |
relative-offset |
Modifies the start location of the beam by the defined vector. |
0,0.5,0 |
target-relative-offset |
Modifies the entity target location of the beam by the defined vector. |
0,0.5,0 |
hit-radius |
Radius around the beam that will be collided with. |
2 |
max-distance |
Max distance it will travel before removal. |
30 |
vertical-hit-radius |
Radius of the vertical collision. |
2 |
y-offset |
Starting position of the beam according to caster's location. (Overrides relative-offset) |
0 |
gravity |
How fast the beam falls, roughly in blocks per traveled distance. |
0 |
interval |
How often it will play the spell's listed effects in ticks. |
1 |
rotation |
Rotation of the beam over time and distance to the degree given. |
0 |
beam-vert-offset |
Starting position vertically. |
0 |
beam-horiz-offset |
Starting position horizontally. |
0 |
beam-spread |
Effectively the opposite of accuracy. A higher number means less accurate. |
0 |
beam-vertical-spread |
Effectively the opposite of vertical accuracy. A higher number means less accurate. (overrides beam-spread) |
0 |
beam-horizontal-spread |
Effectively the opposite of horizontal accuracy. A higher number means less accurate. (overrides beam-spread) |
0 |
change-pitch |
Whether to change start location's pitch. |
true |
stop-on-hit-entity |
Should the beam stop itself when it hits an entity? |
false |
stop-on-hit-ground |
Should the beam stop itself when it hits ground? |
false |
Spell Configuration:
| Option |
Description |
Default Value |
spell |
Sub-spell cast on hit. |
"" |
spell-on-end |
Sub-spell cast on beam's end position. |
"" |
spell-on-travel |
Sub-spell cast on each block along the beam's length |
"" |
spell-on-hit-ground |
Sub-spell cast when the beam hits ground. |
"" |
spell-on-entity-location |
Sub-spell to cast when beam hits a target, firing at the location the beam hits the entity. For example, if the beam hits the head of a zombie, the spell provided will be casted at the zombie's head. Must be a targeted spell that can hit the ground. |
"" |
Example:
Fire_Beam:
spell-class: ".instant.BeamSpell"
name: "&cFire &6Beam&e"
spell: Fire_Beam_Burn
y-offset: 0
max-distance: 15
interval: 0.5
effects:
1:
position: special
effect: particles
particle-name: redstone
color: F0EA2D
horiz-spread: 0.25
vert-spread: 0.25
count: 20
2:
position: special
effect: particles
particle-name: redstone
color: F0B52D
horiz-spread: 0.5
vert-spread: 0.5
count: 20
3:
position: special
effect: particles
particle-name: redstone
color: F0452D
horiz-spread: 1
vert-spread: 1
count: 20
4:
position: caster
effect: sound
sound: item.firecharge.use
volume: 5
pitch: 1.5
Fire_Beam_Burn:
spell-class: ".targeted.CombustSpell"
fire-ticks: 100
fire-tick-damage: 1
prevent-immunity: true
target-players: true
check-plugins: true
effects:
1:
position: target
effect: particles
particle-name: SMOKE_LARGE
height-offset: 1
horiz-spread: 0.25
vert-spread: 0.25
count: 20
speed: 0.1
2:
position: target
effect: particles
particle-name: FLAME
height-offset: 1
horiz-spread: 0.1
vert-spread: 0.1
count: 20
speed: 0.1