Skip to content

missing required data class org.bukkit.Particle$DustOptions #22

@Malfrador

Description

@Malfrador

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
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions