Fix trail particle handling

This commit is contained in:
Nassim Jahnke 2024-10-29 13:33:16 +01:00
parent d2d1d0014f
commit 80b530a368
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
2 changed files with 6 additions and 1 deletions

View File

@ -34,14 +34,19 @@ public final class ParticleRewriter1_21_2 extends ParticleRewriter<ClientboundPa
@Override @Override
public void rewriteParticle(final UserConnection connection, final Particle particle) { public void rewriteParticle(final UserConnection connection, final Particle particle) {
final String identifier = protocol.getMappingData().getParticleMappings().identifier(particle.id());
super.rewriteParticle(connection, particle); super.rewriteParticle(connection, particle);
final String identifier = protocol.getMappingData().getParticleMappings().mappedIdentifier(particle.id());
if (identifier.equals("minecraft:dust_color_transition")) { if (identifier.equals("minecraft:dust_color_transition")) {
argbToVector(particle, 0); argbToVector(particle, 0);
argbToVector(particle, 3); argbToVector(particle, 3);
} else if (identifier.equals("minecraft:dust")) { } else if (identifier.equals("minecraft:dust")) {
argbToVector(particle, 0); argbToVector(particle, 0);
} else if (identifier.equals("minecraft:trail")) {
// Remove target
particle.removeArgument(2);
particle.removeArgument(1);
particle.removeArgument(0);
} }
} }