Skip to content

Effectlib Effect

JasperLorelai edited this page Jul 14, 2023 · 10 revisions

Description: Allows you to use effectlib effects in your spells (Effectlib is an external plugin that allows you to create things like particle spheres easily)

Plugin Source: https://github.com/Chronoken/EffectLib

Configuration:

  • This configuration should be under the effectlib configuration section. effectlib should be on the same level as position and the rest of spell effect options.
  • subeffect TODO
Option Description Default Value
class Defines the effectlib class. A list of these classes can be found here.
type The three types of effects are delayed, instant, and repeating. delayed effects are delayed once based on the interval of time specified in the delay option. instant effects are played once instantly. repeating effects are played instantly several times based on the interval of time specified in the period option and the number of times specified in the iterations option. Varies
particle The name of the particle that is displayed. Use Spigot particle names which can be found here. spell_mob
color The HEX color of the particle. REDSTONE, SPELL_MOB and SPELL_MOB_AMBIENT particles can be colored. 000000
colors String list of hex colors separated by ,. A random one is chosen.
toColor The HEX color for a redstone particle to transition to. 000000
toColors String list of hex colors separated by ,. A random one is selected.
shriekDelay Integer - Used only by the shriek particle in 1.19 and up.
sculkChargeRotation Float - Used only by the sculk_charge particle in 1.19 and up.
arrivalTime Integer - Used only by the vibration particle in 1.17 and up.
speed The speed of the particle. 0
particleData This is a still-working precursor for speed. 0
delay A delay before the effect is played (in ticks). 0
period How many ticks in between each iteration. 1
iterations How many times the effect is played. 0
duration Defined with milliseconds. If set, this will adjust iterations to match the defined delay such that the effect lasts a specific duration.
probability Probability that this effect will play on each iteration. This is a float number from 0-1. 1
visibleRange Display particles to players within this radius. 32
autoOrient If true, and a "target" Location or Entity is set, the two Locations will orient to face one another. false
offset The x,y,z offset relative to the caster, will not follow where you look. 0,0,0
relativeOffset The x,y,z offset relative to the caster, will follow where you look. 0,0,0
targetOffset Will offset the target location. 0,0,0
yaw, yawOffset Used to modify the direction of the origin location. 0
pitch, pitchOffset Used to modify the direction of the origin location. 0
updateLocations If true, and a "target" Location or Entity is set, the two Locations will orient to face one another. true
updateDirections If set to false, Entity-bound directions will not update during the Effect. true
material Defines the block type to be used in BLOCK_CRACK, BLOCK_DUST and FALLING_DUST. ""
materialData The data value of the material being used. 0
blockData A string with block states inside square brackets.
blockDuration Fake block duration.
particleCount Amount of particles played in one iteration. 1
particleOffsetX This can be used to apply x offset to spawned particles. 0
particleOffsetY This can be used to apply y offset to spawned particles. 0
particleOffsetZ This can be used to apply z offset to spawned particles. 0
particleSize Used to scale up or down the size of redstone particles. 1
asynchronous Generally this shouldn't be changed, unless you want to make an async effect synchronous. TurnEffect & JumpEffect do not support this. true
disappearWithOriginEntity Should this effect stop playing if the origin entity becomes invalid? false
disappearWithTargetEntity Should this effect stop playing if the target entity becomes invalid? false

A list of classes and their specific options can be found here:

Example:

sphere:
    spell-class: ".instant.DummySpell"
    effects:
      Effect1:
        position: caster
        effect: effectlib 
        effectlib:
            class: SphereEffect
            particle: REDSTONE
            color: 2AB4DD
            radius: 1
            particles: 10
            period: 1
            iterations: 1
            relativeOffset: 0,1,0
            delay: 0
      Effect2:
        position: caster
        effect: effectlib 
        effectlib:
            class: SphereEffect
            particle: REDSTONE
            color: 2AB4DD
            radius: 1
            particles: 10
            period: 1
            iterations: 1
            relativeOffset: 0,2,0
            delay: 0
Clone this wiki locally