mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 01:31:29 +01:00
SPIGOT-7268: CraftMetaPotion reads ShowParticles and ShowIcon properties incorrectly
By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
parent
9cb4cf919d
commit
b83c3d9c17
@ -90,8 +90,8 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
|
|||||||
int amp = effect.getByte(AMPLIFIER.NBT);
|
int amp = effect.getByte(AMPLIFIER.NBT);
|
||||||
int duration = effect.getInt(DURATION.NBT);
|
int duration = effect.getInt(DURATION.NBT);
|
||||||
boolean ambient = effect.getBoolean(AMBIENT.NBT);
|
boolean ambient = effect.getBoolean(AMBIENT.NBT);
|
||||||
boolean particles = tag.contains(SHOW_PARTICLES.NBT, CraftMagicNumbers.NBT.TAG_BYTE) ? effect.getBoolean(SHOW_PARTICLES.NBT) : true;
|
boolean particles = effect.contains(SHOW_PARTICLES.NBT, CraftMagicNumbers.NBT.TAG_BYTE) ? effect.getBoolean(SHOW_PARTICLES.NBT) : true;
|
||||||
boolean icon = tag.contains(SHOW_ICON.NBT, CraftMagicNumbers.NBT.TAG_BYTE) ? effect.getBoolean(SHOW_ICON.NBT) : particles;
|
boolean icon = effect.contains(SHOW_ICON.NBT, CraftMagicNumbers.NBT.TAG_BYTE) ? effect.getBoolean(SHOW_ICON.NBT) : particles;
|
||||||
customEffects.add(new PotionEffect(type, duration, amp, ambient, particles, icon));
|
customEffects.add(new PotionEffect(type, duration, amp, ambient, particles, icon));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user