steel_protocol/packets/login/c_login_compression.rs
1use steel_macros::{ClientPacket, WriteTo};
2use steel_registry::packets::login::C_LOGIN_COMPRESSION;
3
4#[derive(ClientPacket, WriteTo, Clone, Debug)]
5#[packet_id(Login = C_LOGIN_COMPRESSION)]
6pub struct CLoginCompression {
7 #[write(as = VarInt)]
8 pub threshold: i32,
9}
10
11impl CLoginCompression {
12 #[must_use]
13 pub const fn new(threshold: i32) -> Self {
14 Self { threshold }
15 }
16}