mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-20 03:44:23 +01:00
Fix broken death messages
This commit is contained in:
parent
9b651da09f
commit
2ec17ae9aa
1 changed files with 5 additions and 3 deletions
|
@ -22,14 +22,16 @@ abstract class MixinDamageSource {
|
||||||
Living.getOrEmpty(entity).map(Living::getAttacker).ifPresent(attacker -> {
|
Living.getOrEmpty(entity).map(Living::getAttacker).ifPresent(attacker -> {
|
||||||
Entity prime = entity.getPrimeAdversary();
|
Entity prime = entity.getPrimeAdversary();
|
||||||
if (prime != null && !attacker.isOwnedBy(prime)) {
|
if (prime != null && !attacker.isOwnedBy(prime)) {
|
||||||
info.setReturnValue(Text.translatable("death.attack.generic.and_also", info.getReturnValue(), attacker.asEntity().getDisplayName()));
|
info.setReturnValue(Text.translatable("death.attack.unicopia.generic.and_also", info.getReturnValue(), attacker.asEntity().getDisplayName()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
info.setReturnValue(Text.translatable("death.attack." + self.getName() + ".player", entity.getDisplayName(), attacker.asEntity().getDisplayName()));
|
String name = self.getName();
|
||||||
|
if (!name.endsWith(".player")) {
|
||||||
|
info.setReturnValue(Text.translatable("death.attack." + name + ".player", entity.getDisplayName(), attacker.asEntity().getDisplayName()));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Pony.of(entity).filter(e -> e.getCompositeRace().canFly()).ifPresent(pony -> {
|
Pony.of(entity).filter(e -> e.getCompositeRace().canFly()).ifPresent(pony -> {
|
||||||
if (pony.getPhysics().isFlying()) {
|
if (pony.getPhysics().isFlying()) {
|
||||||
info.setReturnValue(Text.translatable("death.attack.unicopia.generic.whilst_flying", info.getReturnValue()));
|
info.setReturnValue(Text.translatable("death.attack.unicopia.generic.whilst_flying", info.getReturnValue()));
|
||||||
|
|
Loading…
Reference in a new issue