Fix some errors

This commit is contained in:
Sollace 2023-01-27 22:19:57 +00:00
parent 2b227eee1a
commit f17a682d8c
2 changed files with 2 additions and 5 deletions

View file

@ -70,10 +70,6 @@ public class RaceChangeStatusEffect extends StatusEffect {
return;
}
if (eq instanceof Pony pony) {
pony.setRespawnRace(race);
}
int ticks = Math.max(0, MAX_DURATION - state.getDuration());
Stage stage = Stage.forDuration(ticks / STAGE_DURATION);
@ -99,6 +95,7 @@ public class RaceChangeStatusEffect extends StatusEffect {
if (eq instanceof Pony pony) {
MagicReserves magic = pony.getMagicalReserves();
pony.setRespawnRace(race);
magic.getExertion().add(50);
magic.getEnergy().add(3);
magic.getExhaustion().add(3);

View file

@ -630,7 +630,7 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
boolean forcedSwap = !alive
&& entity instanceof ServerPlayerEntity
&& entity.world.getGameRules().getBoolean(UGameRules.SWAP_TRIBE_ON_DEATH)
&& oldPlayer.asEntity().getDamageTracker().getMostRecentDamage().getDamageSource() != MagicalDamageSource.TRIBE_SWAP;
&& oldPlayer.respawnRace == Race.UNSET;
if (alive) {
oldPlayer.getSpellSlot().stream(true).forEach(getSpellSlot()::put);