SPIGOT-678: Fix the particles flag being ignored in PotionMeta
Dieser Commit ist enthalten in:
Ursprung
7a30c3117e
Commit
294d07dcc0
@ -24,6 +24,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
|
||||
static final ItemMetaKey AMPLIFIER = new ItemMetaKey("Amplifier", "amplifier");
|
||||
static final ItemMetaKey AMBIENT = new ItemMetaKey("Ambient", "ambient");
|
||||
static final ItemMetaKey DURATION = new ItemMetaKey("Duration", "duration");
|
||||
static final ItemMetaKey SHOW_PARTICLES = new ItemMetaKey("ShowParticles", "has-particles");
|
||||
static final ItemMetaKey POTION_EFFECTS = new ItemMetaKey("CustomPotionEffects", "custom-effects");
|
||||
static final ItemMetaKey ID = new ItemMetaKey("Id", "potion-id");
|
||||
|
||||
@ -55,7 +56,8 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
|
||||
int amp = effect.getByte(AMPLIFIER.NBT);
|
||||
int duration = effect.getInt(DURATION.NBT);
|
||||
boolean ambient = effect.getBoolean(AMBIENT.NBT);
|
||||
customEffects.add(new PotionEffect(type, duration, amp, ambient));
|
||||
boolean particles = effect.getBoolean(SHOW_PARTICLES.NBT);
|
||||
customEffects.add(new PotionEffect(type, duration, amp, ambient, particles));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -90,6 +92,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
|
||||
effectData.setByte(AMPLIFIER.NBT, (byte) effect.getAmplifier());
|
||||
effectData.setInt(DURATION.NBT, effect.getDuration());
|
||||
effectData.setBoolean(AMBIENT.NBT, effect.isAmbient());
|
||||
effectData.setBoolean(SHOW_PARTICLES.NBT, effect.hasParticles());
|
||||
effectList.add(effectData);
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren