mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 23:27:59 +01:00
Remove the metamorphosis potion when complete
This commit is contained in:
parent
5be2b2a0b9
commit
3601507931
1 changed files with 7 additions and 1 deletions
|
@ -84,6 +84,7 @@ public class RaceChangeStatusEffect extends StatusEffect {
|
||||||
if (progression == 0 && entity instanceof PlayerEntity player && stage == Stage.CRAWLING) {
|
if (progression == 0 && entity instanceof PlayerEntity player && stage == Stage.CRAWLING) {
|
||||||
player.sendMessage(Stage.INITIAL.getMessage(race), true);
|
player.sendMessage(Stage.INITIAL.getMessage(race), true);
|
||||||
}
|
}
|
||||||
|
entity.removeStatusEffect(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,6 +107,8 @@ public class RaceChangeStatusEffect extends StatusEffect {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stage == Stage.DEATH) {
|
if (stage == Stage.DEATH) {
|
||||||
|
entity.removeStatusEffect(this);
|
||||||
|
|
||||||
if (eq instanceof Caster) {
|
if (eq instanceof Caster) {
|
||||||
((Caster<?>)eq).getSpellSlot().clear();
|
((Caster<?>)eq).getSpellSlot().clear();
|
||||||
}
|
}
|
||||||
|
@ -115,7 +118,10 @@ public class RaceChangeStatusEffect extends StatusEffect {
|
||||||
magic.getEnergy().set(0.6F);
|
magic.getEnergy().set(0.6F);
|
||||||
magic.getExhaustion().set(0);
|
magic.getExhaustion().set(0);
|
||||||
magic.getExertion().set(0);
|
magic.getExertion().set(0);
|
||||||
entity.damage(MagicalDamageSource.TRIBE_SWAP, Float.MAX_VALUE);
|
|
||||||
|
if (!pony.asEntity().isCreative()) {
|
||||||
|
entity.damage(MagicalDamageSource.TRIBE_SWAP, Float.MAX_VALUE);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
eq.setSpecies(race);
|
eq.setSpecies(race);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue