From 0f88e05a0cfe43c910f130f8e70f51055d9f6fd2 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sun, 16 Oct 2022 23:08:39 -0500 Subject: Add chat function (#28) * add Client::chat * make the default bot do chat --- azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs | 2 +- azalea-protocol/src/packets/game/serverbound_chat_command_packet.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'azalea-protocol/src') diff --git a/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs index c6013fc2..e961828e 100644 --- a/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs @@ -68,7 +68,7 @@ pub struct LastSeenMessagesEntry { pub last_signature: MessageSignature, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, McBuf, Default)] pub struct LastSeenMessagesUpdate { pub last_seen: Vec, pub last_received: Option, diff --git a/azalea-protocol/src/packets/game/serverbound_chat_command_packet.rs b/azalea-protocol/src/packets/game/serverbound_chat_command_packet.rs index 426ca882..a840e44f 100644 --- a/azalea-protocol/src/packets/game/serverbound_chat_command_packet.rs +++ b/azalea-protocol/src/packets/game/serverbound_chat_command_packet.rs @@ -9,7 +9,7 @@ pub struct ServerboundChatCommandPacket { pub command: String, // TODO: Choose a real timestamp type pub timestamp: u64, - pub salt: i64, + pub salt: u64, pub argument_signatures: Vec, pub signed_preview: bool, pub last_seen_messages: LastSeenMessagesUpdate, -- cgit v1.2.3