mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-01-31 19:16:44 +01:00
Fix some errors
This commit is contained in:
parent
2b227eee1a
commit
f17a682d8c
2 changed files with 2 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue