Skip to content
JasperLorelai edited this page May 19, 2024 · 18 revisions

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

effect: effectlib

Description:

Allows you to use EffectLib effects in your spells (Effectlib is a library that allows you to create things like particle spheres easily).

Configuration:

  • The top-most EffectLib effect (they can have sub-effects) should hold its configuration under the effectlib configuration section. effectlib should be on the same level as position and the rest of Spell Effects options.
  • Since 4.0 Beta 13 most of these options support dynamic values through numeric or string expressions.

Example:

sphere:
    spell-class: ".instant.DummySpell"
    effects:
      Effect1:
        position: caster
        effect: effectlib 
        effectlib:
          class: SphereEffect
          # . . .
          subEffect:
            subEffectClass: Sphere
            # . . .

Commonly overridden:

Option Description Type Default
type May be: 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.
String Varies by effect
period How many ticks are in between each iteration. Integer 1
iterations How many times the effect is played. Integer 0
particle The name of the particle that is displayed. Particle "spell_mob"
speed The speed of the particle. Float 0
color Color 000000
asynchronous Generally this shouldn't be changed unless you want to make an async effect synchronous. TurnEffect & JumpEffect do not support this. Boolean true

Other:

Option Description Type Default
class Defines the effectlib class. A list of these classes can be found here. String
subEffect Sub-effect played at the position of particles of the current effect. You can set particleCount to -1 to disable them. Note that this effect uses subEffectClass instead of class. Sub-effects may have their own sub-effects. Configuration Section containing an Effectlib Effect
subEffectClass Same as class. Used when defining a subEffect. String
colors String list of colors separated by ,. A random one is chosen. String
toColor The color for a redstone particle to transition to. String 000000
toColors String list of colors separated by ,. A random one is selected. String
shriekDelay Used only by the shriek particle. Integer
sculkChargeRotation Used only by the sculk_charge particle. Float
arrivalTime Used only by the vibration particle. Integer
particleData This is a still-working precursor for speed. Float 0
delay A delay before the effect is played (in ticks). Integer 0
duration Defined with milliseconds. If set, this will adjust iterations to match the defined delay such that the effect lasts a specific duration. Integer
probability Probability that this effect will play on each iteration. Float (0-1) 1
visibleRange Display particles to players within this radius. Float 32
autoOrient If true, and a "target" Location or Entity is set, the two Locations will orient to face one another. Boolean false
offset The x,y,z offset relative to the caster, will not follow where you look. String "0,0,0"
relativeOffset The x,y,z offset relative to the caster, will follow where you look. String "0,0,0"
targetOffset Will offset the target location. String "0,0,0"
yaw, yawOffset Used to modify the direction of the origin location. Float 0
pitch, pitchOffset Used to modify the direction of the origin location. Float 0
updateLocations If true, and a "target" Location or Entity is set, the two Locations will orient to face one another. Boolean true
updateDirections If set to false, Entity-bound directions will not update during the Effect. Boolean true
material Defines the block type to be used in BLOCK_CRACK, BLOCK_DUST and FALLING_DUST. Material
materialData The data value of the material being used. Byte (number) 0
blockData Block data
blockDuration Fake block duration in server ticks. Long (number)
particleCount Amount of particles played in one iteration. Set to -1 to disable particles - this is useful when using sub-effects. Integer 1
particleOffsetX This can be used to apply x offset to spawned particles. Float 0
particleOffsetY This can be used to apply y offset to spawned particles. Float 0
particleOffsetZ This can be used to apply z offset to spawned particles. Float 0
particleSize Used to scale up or down the size of redstone particles. Float 1
disappearWithOriginEntity Should this effect stop playing if the origin entity becomes invalid? Boolean false
disappearWithTargetEntity Should this effect stop playing if the target entity becomes invalid? Boolean false

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

Color:

A string representing a hex color of a particle. The hex color may be prefixed with # but it must be followed by six hexadecimal digits (0-9 & a-f). You can also use random.

Clone this wiki locally