From ffba10185401ebdbfd93b1181eda04ce08fa72d5 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 7 May 2022 21:54:27 -0500 Subject: chat and sound packets --- .../src/packets/game/clientbound_chat_packet.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 azalea-protocol/src/packets/game/clientbound_chat_packet.rs (limited to 'azalea-protocol/src/packets/game/clientbound_chat_packet.rs') diff --git a/azalea-protocol/src/packets/game/clientbound_chat_packet.rs b/azalea-protocol/src/packets/game/clientbound_chat_packet.rs new file mode 100644 index 00000000..3786993a --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_chat_packet.rs @@ -0,0 +1,17 @@ +use azalea_chat::component::Component; +use packet_macros::{GamePacket, McBufReadable, McBufWritable}; +use uuid::Uuid; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundChatPacket { + pub message: Component, + pub type_: ChatType, + pub sender: Uuid, +} + +#[derive(Clone, Debug, Copy, McBufReadable, McBufWritable)] +pub enum ChatType { + Chat = 0, + System = 1, + GameInfo = 2, +} -- cgit v1.2.3