aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/c_disguised_chat.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-03-25 11:17:39 -0500
committerGitHub <noreply@github.com>2025-03-25 11:17:39 -0500
commitef357fdf3667f3ded03203fc0f7cdec48a01ad8f (patch)
tree6e7429c62a22fec1988278f63554c93bdd905a5d /azalea-protocol/src/packets/game/c_disguised_chat.rs
parent8af265e48bf9f3d5263c074d034770e4216bb3f3 (diff)
downloadazalea-drasl-ef357fdf3667f3ded03203fc0f7cdec48a01ad8f.tar.xz
1.21.5 (#198)
* 25w02a * move item_components codegen to a different module * remove outdated test * 25w03a * start updating to 24w09b * 1.21.5-pre2 * fix broken packets * 1.21.5-rc2 * merge main * delete unused acket_handling * 1.21.5
Diffstat (limited to 'azalea-protocol/src/packets/game/c_disguised_chat.rs')
-rw-r--r--azalea-protocol/src/packets/game/c_disguised_chat.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/azalea-protocol/src/packets/game/c_disguised_chat.rs b/azalea-protocol/src/packets/game/c_disguised_chat.rs
index 90dc5d64..97157089 100644
--- a/azalea-protocol/src/packets/game/c_disguised_chat.rs
+++ b/azalea-protocol/src/packets/game/c_disguised_chat.rs
@@ -1,7 +1,7 @@
use azalea_buf::AzBuf;
use azalea_chat::{
- translatable_component::{StringOrComponent, TranslatableComponent},
FormattedText,
+ translatable_component::{StringOrComponent, TranslatableComponent},
};
use azalea_protocol_macros::ClientboundGamePacket;
@@ -25,8 +25,6 @@ impl ClientboundDisguisedChat {
let content = self.message.clone();
let target = self.chat_type.target_name.clone();
- let translation_key = self.chat_type.chat_type.chat_translation_key();
-
let mut args = vec![
StringOrComponent::FormattedText(sender),
StringOrComponent::FormattedText(content),
@@ -35,6 +33,7 @@ impl ClientboundDisguisedChat {
args.push(StringOrComponent::FormattedText(target));
}
+ let translation_key = self.chat_type.translation_key();
let component = TranslatableComponent::new(translation_key.to_string(), args);
FormattedText::Translatable(component)