Skip to content
JasperLorelai edited this page Nov 11, 2023 · 18 revisions

Source Code

spell-class: ".targeted.OrbitSpell"

Description:

A targeted spell that creates an orbit rotating around the target.

Configuration:

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

Option Description Type Default Supports expressions
can-hit Target list String List false
max-duration Max duration of the orbit (in seconds). Double 20 true
tick-interval How often to play the particle effect and check hitboxes (in ticks). Integer 2 true
vert-expand-delay How often to expand the orbit vertically. (in ticks) (requires vert-expand-radius) Integer 0 true
horiz-expand-delay How often to expand the orbit horizontally. (in ticks) (requires horiz-expand-radius) Integer 0 true
y-offset Modifies the start height location. Float 0.6 true
hit-radius How far from the center of the orbit to look for entities to hit. Float 1 true
vertical-hit-radius How far vertically from the center of the orbit to look for entities to hit. Float 1 true
orbit-radius How far from the center of the start location should the orbit be? Float 1 true
start-horiz-offset Modifies the start location by rotating it around the defined angle. Float 0 true
vert-expand-radius Defines how much to expand the orbit radius vertically. (requires vert-expand-delay) Float 0 true
horiz-expand-radius Defines how much to expand the orbit radius horizontally. (requires horiz-expand-delay) Float 0 true
seconds-per-revolution How many seconds does the orbit need to make a full circle? Float 3 true
follow-yaw Since Beta 13. When true, the orbit is adjusted as the target changes yaw. If the target rotates counter-clockwise, the orbit will rotate to match. Boolean false true
stop-on-hit-entity Should the orbit disappear when it hits an entity? Boolean false true
stop-on-hit-ground Should the orbit disappear when it hits the ground? Boolean false true
counter-clockwise Should the orbit rotate in a reverse way? Boolean false true
require-entity-target Should the orbit rotate around an entity target? Boolean true true
spell Sub-spell to cast at the orbit location. String false
spell-on-hit-ground Sub-spell to cast at the orbit location when it hits the ground. String false
spell-on-hit-entity Sub-spell to cast at the entity target. String false

Examples:

Example 1:

Astral-Spheres:
    spell-class: ".MultiSpell"
    name: "Astral Spheres"
    cast-item: bone
    cooldown: 20
    cost:
        - mana 25
    str-cost: "25 Mana"
    permission-name: astral_spheres
    spells:
        - ORBIT_ASTRAL_SPHERES_1
        - ORBIT_ASTRAL_SPHERES_2
        - ORBIT_ASTRAL_SPHERES_3

ORBIT_ASTRAL_SPHERES_1: &astralSphere
    spell-class: ".targeted.OrbitSpell"
    helper-spell: true
    permission-name: astral_spheres
    target-self: true
    horiz-expand-delay: 2
    horiz-expand-radius: 0.025
    vert-expand-delay: 2
    vert-expand-radius: 0.01
    start-horiz-offset: 0
    hit-radius: 1.25
    vertical-hit-radius: 1.25
    seconds-per-revolution: 3
    orbit-radius: 2
    tick-interval: 1
    max-duration: 10
    y-offset: 0.25
    stop-on-hit-entity: true
    stop-on-hit-ground: true
    can-hit:
        - players
        - nonplayers
    spell: FORCEBOMB_ASTRAL_SPHERES
    spell-on-hit-entity: DMG_ASTRAL_SPHERES
    spell-on-hit-ground: EFF_ASTRAL_SPHERES_GROUND
    effects:
        eff1:
            position: special
            effect: effectlib
            effectlib:
                class: SphereEffect
                particle: REDSTONE
                color: FF00FF
                iterations: 1
                radius: 0.25
                particles: 15
                period: 0
                visibleRange: 100
        eff2:
            position: special
            effect: effectlib
            effectlib:
                class: SphereEffect
                particle: REDSTONE
                color: 9400D3
                iterations: 1
                radius: 0.5
                particles: 15
                period: 0
                visibleRange: 100

ORBIT_ASTRAL_SPHERES_2:
    <<: *astralSphere
    start-horiz-offset: 120
    effects:
        eff1:
            position: special
            effect: effectlib
            effectlib:
                class: SphereEffect
                particle: REDSTONE
                color: FF00FF
                iterations: 1
                radius: 0.25
                particles: 15
                period: 0
                visibleRange: 100
        eff2:
            position: special
            effect: effectlib
            effectlib:
                class: SphereEffect
                particle: REDSTONE
                color: 9400D3
                iterations: 1
                radius: 0.5
                particles: 15
                period: 0
                visibleRange: 100

ORBIT_ASTRAL_SPHERES_3:
    <<: *astralSphere
    start-horiz-offset: 240
    effects:
        eff1:
            position: special
            effect: effectlib
            effectlib:
                class: SphereEffect
                particle: REDSTONE
                color: FF00FF
                iterations: 1
                radius: 0.25
                particles: 15
                period: 0
                visibleRange: 100
        eff2:
            position: special
            effect: effectlib
            effectlib:
                class: SphereEffect
                particle: REDSTONE
                color: 9400D3
                iterations: 1
                radius: 0.5
                particles: 15
                period: 0
                visibleRange: 100

FORCEBOMB_ASTRAL_SPHERES:
    spell-class: ".targeted.ForcebombSpell"
    helper-spell: true
    permission-name: astral_spheres
    radius: 3
    pushback-force: -5
    additional-vertical-force: 2
    max-vertical-force: 2
    can-target: players,nonplayers

EFF_ASTRAL_SPHERES_GROUND:
    spell-class: ".targeted.DummySpell"
    helper-spell: true
    permission-name: astral_spheres
    effects:
        eff1:
            position: target
            effect: particles
            particle-name: explosion_large
            horiz-spread: 0.5
            vert-spread: 0.5
            count: 5
            speed: 0

DMG_ASTRAL_SPHERES:
    spell-class: ".targeted.PainSpell"
    helper-spell: true
    permission-name: astral_spheres
    damage: 3
    check-plugins: true
    ignore-armor: false
    can-target: players,nonplayers
    effects:
        eff1:
            position: target
            height-offset: 0.75
            effect: particles
            particle-name: explosion_large
            horiz-spread: 0.3
            vert-spread: 0.3
            count: 2
            speed: 0

Example 2:

GrandSaviorOrbit1:
    spell-class: ".targeted.OrbitSpell"
    target-self: true
    hit-radius: 1
    seconds-per-revolution: 5
    orbit-radius: 2
    tick-interval: 1
    max-duration: 10
    y-offset: 0.25
    stop-on-hit-entity: false
    stop-on-hit-ground: false
    start-horiz-offset: 0
    effects:
        eff1:
            position: projectile
            effect: armorstand
            armorstand:
                mainhand: golden_sword
                right-arm-angle: 1.4,-0.2,0
                visible: false
                gravity: false

Examples:

Example 1:

Astral-Spheres:
    spell-class: ".MultiSpell"
    name: "Astral Spheres"
    cast-item: bone
    cooldown: 20
    cost:
        - mana 25
    str-cost: "25 Mana"
    permission-name: astral_spheres
    spells:
        - ORBIT_ASTRAL_SPHERES_1
        - ORBIT_ASTRAL_SPHERES_2
        - ORBIT_ASTRAL_SPHERES_3

ORBIT_ASTRAL_SPHERES_1: &astralSphere
    spell-class: ".targeted.OrbitSpell"
    helper-spell: true
    permission-name: astral_spheres
    target-self: true
    horiz-expand-delay: 2
    horiz-expand-radius: 0.025
    vert-expand-delay: 2
    vert-expand-radius: 0.01
    start-horiz-offset: 0
    hit-radius: 1.25
    vertical-hit-radius: 1.25
    seconds-per-revolution: 3
    orbit-radius: 2
    tick-interval: 1
    max-duration: 10
    y-offset: 0.25
    stop-on-hit-entity: true
    stop-on-hit-ground: true
    can-hit:
        - players
        - nonplayers
    spell: FORCEBOMB_ASTRAL_SPHERES
    spell-on-hit-entity: DMG_ASTRAL_SPHERES
    spell-on-hit-ground: EFF_ASTRAL_SPHERES_GROUND
    effects:
        eff1:
            position: special
            effect: effectlib
            effectlib:
                class: SphereEffect
                particle: REDSTONE
                color: FF00FF
                iterations: 1
                radius: 0.25
                particles: 15
                period: 0
                visibleRange: 100
        eff2:
            position: special
            effect: effectlib
            effectlib:
                class: SphereEffect
                particle: REDSTONE
                color: 9400D3
                iterations: 1
                radius: 0.5
                particles: 15
                period: 0
                visibleRange: 100

ORBIT_ASTRAL_SPHERES_2:
    <<: *astralSphere
    start-horiz-offset: 120
    effects:
        eff1:
            position: special
            effect: effectlib
            effectlib:
                class: SphereEffect
                particle: REDSTONE
                color: FF00FF
                iterations: 1
                radius: 0.25
                particles: 15
                period: 0
                visibleRange: 100
        eff2:
            position: special
            effect: effectlib
            effectlib:
                class: SphereEffect
                particle: REDSTONE
                color: 9400D3
                iterations: 1
                radius: 0.5
                particles: 15
                period: 0
                visibleRange: 100

ORBIT_ASTRAL_SPHERES_3:
    <<: *astralSphere
    start-horiz-offset: 240
    effects:
        eff1:
            position: special
            effect: effectlib
            effectlib:
                class: SphereEffect
                particle: REDSTONE
                color: FF00FF
                iterations: 1
                radius: 0.25
                particles: 15
                period: 0
                visibleRange: 100
        eff2:
            position: special
            effect: effectlib
            effectlib:
                class: SphereEffect
                particle: REDSTONE
                color: 9400D3
                iterations: 1
                radius: 0.5
                particles: 15
                period: 0
                visibleRange: 100

FORCEBOMB_ASTRAL_SPHERES:
    spell-class: ".targeted.ForcebombSpell"
    helper-spell: true
    permission-name: astral_spheres
    radius: 3
    pushback-force: -5
    additional-vertical-force: 2
    max-vertical-force: 2
    can-target: players,nonplayers

EFF_ASTRAL_SPHERES_GROUND:
    spell-class: ".targeted.DummySpell"
    helper-spell: true
    permission-name: astral_spheres
    effects:
        eff1:
            position: target
            effect: particles
            particle-name: explosion_large
            horiz-spread: 0.5
            vert-spread: 0.5
            count: 5
            speed: 0

DMG_ASTRAL_SPHERES:
    spell-class: ".targeted.PainSpell"
    helper-spell: true
    permission-name: astral_spheres
    damage: 3
    check-plugins: true
    ignore-armor: false
    can-target: players,nonplayers
    effects:
        eff1:
            position: target
            height-offset: 0.75
            effect: particles
            particle-name: explosion_large
            horiz-spread: 0.3
            vert-spread: 0.3
            count: 2
            speed: 0

Example 2:

GrandSaviorOrbit1:
    spell-class: ".targeted.OrbitSpell"
    target-self: true
    hit-radius: 1
    seconds-per-revolution: 5
    orbit-radius: 2
    tick-interval: 1
    max-duration: 10
    y-offset: 0.25
    stop-on-hit-entity: false
    stop-on-hit-ground: false
    start-horiz-offset: 0
    effects:
        eff1:
            position: projectile
            effect: armorstand
            armorstand:
                mainhand: golden_sword
                right-arm-angle: 1.4,-0.2,0
                visible: false
                gravity: false
Clone this wiki locally