Skip to main content

steel_protocol/packets/common/
c_keep_alive.rs

1use steel_macros::{ClientPacket, WriteTo};
2use steel_registry::packets::config::C_KEEP_ALIVE;
3use steel_registry::packets::play::C_KEEP_ALIVE as PLAY_C_KEEP_ALIVE;
4
5#[derive(ClientPacket, WriteTo, Clone, Debug)]
6#[packet_id(Config = C_KEEP_ALIVE, Play = PLAY_C_KEEP_ALIVE)]
7pub struct CKeepAlive {
8    pub id: i64,
9}
10
11impl CKeepAlive {
12    #[must_use]
13    pub const fn new(id: i64) -> Self {
14        Self { id }
15    }
16}