3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 08:30:09 +01:00

Handle removed particles

Dieser Commit ist enthalten in:
Matsv 2018-04-04 21:46:59 +02:00
Ursprung 0ec5777f12
Commit 613001a600
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -111,7 +111,7 @@ public class ParticleRewriter {
particle.getArguments().add(new Particle.ParticleData(Type.FLOAT, randomFloat())); // Red 0 - 1 particle.getArguments().add(new Particle.ParticleData(Type.FLOAT, randomFloat())); // Red 0 - 1
particle.getArguments().add(new Particle.ParticleData(Type.FLOAT, randomFloat())); // Green 0 - 1 particle.getArguments().add(new Particle.ParticleData(Type.FLOAT, randomFloat())); // Green 0 - 1
particle.getArguments().add(new Particle.ParticleData(Type.FLOAT, randomFloat())); // Blue 0 - 1 particle.getArguments().add(new Particle.ParticleData(Type.FLOAT, randomFloat())); // Blue 0 - 1
particle.getArguments().add(new Particle.ParticleData(Type.FLOAT, 1));// Scale 0.01 - 4 TODO test scale particle.getArguments().add(new Particle.ParticleData(Type.FLOAT, 1));// Scale 0.01 - 4
return particle; return particle;
} }
}; };

Datei anzeigen

@ -224,8 +224,8 @@ public class WorldPackets {
Particle particle = ParticleRewriter.rewriteParticle(particleId, data); Particle particle = ParticleRewriter.rewriteParticle(particleId, data);
// Cancel if null // Cancel if null or completely removed
if (particle == null) { if (particle == null || particle.getId() == -1) {
wrapper.cancel(); wrapper.cancel();
return; return;
} }