1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00
azalea/azalea-protocol/src/packets/game/s_chat.rs

22 lines
612 B
Rust

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 {
#[limit(256)]
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 offset: u32,
pub acknowledged: FixedBitSet<{ 20_usize.div_ceil(8) }>,
pub checksum: u8,
}