forked from Slikey/EffectLib
-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Trying to spawn a Particle.DUST fails due to EffectLib not settings the data class.
EffectLib-Version: 10.10
Minecraft version: 1.21.7
Stacktrace: https://pastes.dev/vAY4MrIdt7
Using my fork here, but same issue happens on Paper.
Particle code:
LineEffect lineEffect = new LineEffect(Spellbook.getInstance().getEffectManager());
lineEffect.setLocation(caster.getLocation().add(0, -0.5, 0));
lineEffect.setTarget(launcherTrait.getTargetLocation());
lineEffect.particle = Particle.DUST;
lineEffect.particleSize = 0.1f;
lineEffect.color = Color.TEAL;
lineEffect.duration = 20;
lineEffect.start();
Looking at ParticleDisplay_Modern, it seems to set them only if the particle is REDSTONE. That particle is named DUST now, so the DustOptions will not be set.
The Craftbukkit legacy hackery which renames REDSTONE to DUST does not seem to catch this case, and even if it did relying on it would be pretty bad.
Maybe in general checking Particle#getDataType would be better than hardcoding the ones that need data.
Metadata
Metadata
Assignees
Labels
No labels