chunkedge_protocol/packets/play/chat_c2s.rs
1use chunkedge_binary::{Bounded, Decode, Encode, VarInt};
2
3use crate::{FixedBitSet, Packet};
4
5#[derive(Clone, Debug, Encode, Decode, Packet)]
6pub struct ChatC2s<'a> {
7 pub message: Bounded<&'a str, 256>,
8 pub timestamp: u64,
9 pub salt: u64,
10 pub signature: Option<&'a [u8; 256]>,
11 pub message_count: VarInt,
12 // This is a bitset of 20; each bit represents one
13 // of the last 20 messages received and whether or not
14 // the message was acknowledged by the client
15 pub acknowledgement: FixedBitSet<20, 3>,
16 pub checksum: i8,
17}