aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/s_chat.rs
blob: 40c7e123bb47e2a0721f36be7da9452adf0f5b5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use azalea_buf::AzBuf;
use azalea_core::bitset::FixedBitSet;
use azalea_crypto::MessageSignature;
use azalea_protocol_macros::ServerboundGamePacket;

#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)]
pub struct ServerboundChat {
    pub message: String,
    pub timestamp: u64,
    pub salt: u64,
    pub signature: Option<MessageSignature>,
    pub last_seen_messages: LastSeenMessagesUpdate,
}

#[derive(Clone, Debug, AzBuf, Default)]
pub struct LastSeenMessagesUpdate {
    #[var]
    pub messages: u32,
    pub acknowledged: FixedBitSet<{ 20_usize.div_ceil(8) }>,
}