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
1 changed files with 8 additions and 1 deletions

View File

@ -124,7 +124,14 @@ public class CmdSeeChunk extends FCommand {
}
if (useParticles) {
if (P.p.useNonPacketParticles) {
player.spawnParticle(Particle.REDSTONE, loc, 0, new Particle.DustOptions(Color.RED, 1));
// 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));
} else {
player.getWorld().spawnParticle(Particle.REDSTONE, loc, 0, 255, 0, 0, 1);
}
} else {
this.effect.display(0, 0, 0, 0, 1, loc, player);
}