Merge pull request #260 from ReplayMod/smoke-effect-bounds

Fix out of bounds smoke effect data
This commit is contained in:
Steven Smith 2017-08-24 16:46:36 -07:00 committed by GitHub
commit 18007c056d

View file

@ -66,7 +66,7 @@ public class ServerPlayEffectPacket implements Packet {
if(this.effect == SoundEffect.RECORD) {
this.data = new RecordEffectData(value);
} else if(this.effect == ParticleEffect.SMOKE) {
this.data = MagicValues.key(SmokeEffectData.class, value);
this.data = MagicValues.key(SmokeEffectData.class, value % 9);
} else if(this.effect == ParticleEffect.BREAK_BLOCK) {
this.data = new BreakBlockEffectData(new BlockState(value & 4095, (value >> 12) & 255));
} else if(this.effect == ParticleEffect.BREAK_SPLASH_POTION) {