Fixed backward compatibility on 1.12 for particles.

This commit is contained in:
ProSavage 2018-10-18 11:55:21 -05:00
parent 4075c33ef5
commit 713aab8bfa

View File

@ -124,7 +124,14 @@ public class CmdSeeChunk extends FCommand {
} }
if (useParticles) { if (useParticles) {
if (P.p.useNonPacketParticles) { if (P.p.useNonPacketParticles) {
// Dust options only exists in the 1.13 API, so we use an
// alternative method to achieve this in lower versions.
if (P.p.mc113) {
player.spawnParticle(Particle.REDSTONE, loc, 0, new Particle.DustOptions(Color.RED, 1)); player.spawnParticle(Particle.REDSTONE, loc, 0, new Particle.DustOptions(Color.RED, 1));
} else {
player.getWorld().spawnParticle(Particle.REDSTONE, loc, 0, 255, 0, 0, 1);
}
} else { } else {
this.effect.display(0, 0, 0, 0, 1, loc, player); this.effect.display(0, 0, 0, 0, 1, loc, player);
} }