mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-30 16:28:00 +01:00
Added some more death message variances for pegasi
This commit is contained in:
parent
2a13627b3f
commit
a36c1bead3
3 changed files with 24 additions and 1 deletions
|
@ -6,6 +6,8 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
|||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import com.minelittlepony.unicopia.entity.Equine;
|
||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.damage.DamageSource;
|
||||
|
@ -26,5 +28,13 @@ abstract class MixinDamageSource {
|
|||
|
||||
info.setReturnValue(Text.translatable("death.attack." + self.getName() + ".player", entity.getDisplayName(), attacker.asEntity().getDisplayName()));
|
||||
});
|
||||
|
||||
DamageSource self = (DamageSource)(Object)this;
|
||||
|
||||
Pony.of(entity).filter(e -> e.getSpecies().canFly()).ifPresent(pony -> {
|
||||
if (pony.getPhysics().isFlying()) {
|
||||
info.setReturnValue(Text.translatable("death.attack.generic.whilst_flying", info.getReturnValue()));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.*;
|
|||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.minelittlepony.unicopia.ability.magic.Caster;
|
||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
|
@ -99,6 +100,13 @@ public class MagicalDamageSource extends EntityDamageSource {
|
|||
params.add(attacker.getDisplayName());
|
||||
}
|
||||
|
||||
return Text.translatable(basic, params.toArray());
|
||||
Text message = Text.translatable(basic, params.toArray());
|
||||
return Pony.of(target).filter(e -> e.getSpecies().canFly()).map(pony -> {
|
||||
|
||||
if (pony.getPhysics().isFlying()) {
|
||||
return Text.translatable("death.attack.generic.whilst_flying", message);
|
||||
}
|
||||
return message;
|
||||
}).orElse(message);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -492,6 +492,7 @@
|
|||
"unicopia.race.bat.alt": "Bat Ponies",
|
||||
|
||||
"death.attack.generic.and_also": "%1$s and %2$s",
|
||||
"death.attack.generic.whilst_flying": "%1$s whilst flying",
|
||||
"death.attack.tribe_swap": "%1$s was reborn into a different tribe",
|
||||
"death.attack.sun": "%1$s stared into the sun",
|
||||
"death.attack.sun.player": "%1$s stared into the sun whilst fighting %2$s",
|
||||
|
@ -525,6 +526,10 @@
|
|||
"death.attack.black_hole.player": "%1$s got sucked into %2$s's black hole",
|
||||
"death.attack.kick": "%1$s was kicked really hard",
|
||||
"death.attack.kick.player": "%2$s kicked %1$s really hard",
|
||||
"death.attack.fall.pegasus": "%1$s forgot they could fly",
|
||||
"death.attack.fall.pegasus.player": "%1$s forgot they could fly and hit the ground too hard whilst trying to escape %2$s",
|
||||
"death.attack.stalagmite.pegasus": "%1$s tried to perch on a stalagmite",
|
||||
"death.attack.stalagmite.pegasus.player": "%1$s flew into a stalagmite whilst fighting %2$s",
|
||||
|
||||
"unicopia.subtitle.flap_wings": "Wing flaps",
|
||||
"unicopia.subtitle.dash": "Pony Dashes",
|
||||
|
|
Loading…
Reference in a new issue