Fix PotionEffect ignores icon flag
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
This commit is contained in:
@@ -78,7 +78,7 @@ public class CraftPotionUtil {
|
||||
|
||||
public static MobEffectInstance fromBukkit(PotionEffect effect) {
|
||||
Holder<MobEffect> type = CraftPotionEffectType.bukkitToMinecraftHolder(effect.getType());
|
||||
return new MobEffectInstance(type, effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles());
|
||||
return new MobEffectInstance(type, effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()); // Paper
|
||||
}
|
||||
|
||||
public static PotionEffect toBukkit(MobEffectInstance effect) {
|
||||
@@ -87,7 +87,7 @@ public class CraftPotionUtil {
|
||||
int duration = effect.getDuration();
|
||||
boolean ambient = effect.isAmbient();
|
||||
boolean particles = effect.isVisible();
|
||||
return new PotionEffect(type, duration, amp, ambient, particles);
|
||||
return new PotionEffect(type, duration, amp, ambient, particles, effect.showIcon()); // Paper
|
||||
}
|
||||
|
||||
public static boolean equals(Holder<MobEffect> mobEffect, PotionEffectType type) {
|
||||
|
||||
Reference in New Issue
Block a user