mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-30 16:28: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
3aebdee8c2
commit
d1b5a73b18
1 changed files with 5 additions and 1 deletions
|
@ -112,7 +112,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