fix fallback death message

This commit is contained in:
Octol1ttle 2024-01-20 13:21:45 +05:00
parent 81879b6ec4
commit cc20e19a4b
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF

View file

@ -63,8 +63,9 @@ public class KnockdownsEvents {
KnockdownsNetwork.sendToWorld(serverPlayer.getServerWorld(), new PlayKnockedDownSoundS2CPacket(serverPlayer.getX(), serverPlayer.getY(), serverPlayer.getZ())); KnockdownsNetwork.sendToWorld(serverPlayer.getServerWorld(), new PlayKnockedDownSoundS2CPacket(serverPlayer.getX(), serverPlayer.getY(), serverPlayer.getZ()));
TranslatableTextContent content = (TranslatableTextContent) entity.getDamageTracker().getDeathMessage().getContent(); Text deathMessage = entity.getDamageTracker().getDeathMessage();
Text replaced = Text.translatableWithFallback(content.getKey().replace("death.", "knockdown."), content.getKey(), content.getArgs()); TranslatableTextContent content = (TranslatableTextContent) deathMessage.getContent();
Text replaced = Text.translatableWithFallback(content.getKey().replace("death.", "knockdown."), deathMessage.getString(), content.getArgs());
server.getPlayerManager().broadcast(replaced, false); server.getPlayerManager().broadcast(replaced, false);