Fixed effect desync when using changeling abilities

This commit is contained in:
Sollace 2020-05-05 18:48:47 +02:00
parent 136519fb47
commit 325bdd0fdf

View file

@ -128,7 +128,9 @@ public class ChangelingFeedAbility implements Ability<Hit> {
ParticleUtils.spawnParticles(UParticles.CHANGELING_MAGIC, living, 7); ParticleUtils.spawnParticles(UParticles.CHANGELING_MAGIC, living, 7);
if (changeling.hasStatusEffect(StatusEffects.NAUSEA)) { if (changeling.hasStatusEffect(StatusEffects.NAUSEA)) {
living.addStatusEffect(changeling.removeStatusEffectInternal(StatusEffects.NAUSEA)); StatusEffectInstance effect = changeling.getStatusEffect(StatusEffects.NAUSEA);
changeling.removeStatusEffect(StatusEffects.NAUSEA);
living.addStatusEffect(effect);
} else if (changeling.getEntityWorld().random.nextInt(2300) == 0) { } else if (changeling.getEntityWorld().random.nextInt(2300) == 0) {
living.addStatusEffect(new StatusEffectInstance(StatusEffects.WITHER, 20, 1)); living.addStatusEffect(new StatusEffectInstance(StatusEffects.WITHER, 20, 1));
} }