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

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

#[derive(AzBuf, Clone, Debug, Default, PartialEq)]
pub struct LastSeenMessagesUpdate {
    #[var]
    pub offset: u32,
    pub acknowledged: FixedBitSet<20>,
    pub checksum: u8,
}