Pumpkin/pumpkin-protocol/src/client/play/c_system_chat_message.rs
Alexander Medvedev 03e81a1436 transfer packet id parsing to build time
This also allows now to create custom packets with a custom packet id which is not in the packets.json
2025-01-10 13:42:39 +01:00

19 lines
445 B
Rust

use pumpkin_data::packet::clientbound::PLAY_SYSTEM_CHAT;
use pumpkin_util::text::TextComponent;
use pumpkin_macros::client_packet;
use serde::Serialize;
#[derive(Serialize)]
#[client_packet(PLAY_SYSTEM_CHAT)]
pub struct CSystemChatMessage<'a> {
content: &'a TextComponent,
overlay: bool,
}
impl<'a> CSystemChatMessage<'a> {
pub fn new(content: &'a TextComponent, overlay: bool) -> Self {
Self { content, overlay }
}
}