chunkedge_protocol/packets/play/
chat_command_signed_c2s.rs

1use chunkedge_binary::{Bounded, Decode, Encode, VarInt};
2
3use crate::{FixedBitSet, Packet};
4
5#[derive(Clone, Debug, Encode, Decode, Packet)]
6pub struct ChatCommandSignedC2s<'a> {
7    pub command: Bounded<&'a str, 32767>,
8    pub timestamp: i64,
9    pub salt: i64,
10    pub argument_signatures: Bounded<Vec<CommandArgumentSignature<'a>>, 8>,
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}
18
19#[derive(Copy, Clone, Debug, Encode, Decode)]
20pub struct CommandArgumentSignature<'a> {
21    pub argument_name: Bounded<&'a str, 16>,
22    pub signature: &'a [u8; 256],
23}