mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Add handling to update the player's race if we're unable to force a respawn
This commit is contained in:
parent
2e7804e9c6
commit
f25df41fa5
1 changed files with 5 additions and 1 deletions
|
@ -113,7 +113,11 @@ public class RaceChangeStatusEffect extends StatusEffect {
|
|||
magic.getExertion().set(0);
|
||||
|
||||
if (!pony.asEntity().isCreative()) {
|
||||
entity.damage(Living.living(entity).damageOf(UDamageTypes.TRIBE_SWAP), Float.MAX_VALUE);
|
||||
if (!entity.damage(Living.living(entity).damageOf(UDamageTypes.TRIBE_SWAP), Float.MAX_VALUE)) {
|
||||
entity.setHealth(0);
|
||||
pony.setRespawnRace(Race.UNSET);
|
||||
pony.setSpecies(race);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
eq.setSpecies(race);
|
||||
|
|
Loading…
Reference in a new issue