Files
Pumpkin/pumpkin-protocol/src/bedrock/client/network_settings.rs
Alexander Medvedev 2e643cdeb1 add more packets
2025-07-02 15:48:57 +02:00

31 lines
764 B
Rust

use pumpkin_macros::packet;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize)]
#[packet(143)]
pub struct CNetworkSettings {
compression_threshold: u16,
compression_method: u16,
client_throttle_enabled: bool,
client_throttle_threshold: i8,
client_throttle_scalar: f32,
}
impl CNetworkSettings {
pub fn new(
compression_threshold: u16,
compression_method: u16,
client_throttle_enabled: bool,
client_throttle_threshold: i8,
client_throttle_scalar: f32,
) -> Self {
Self {
compression_threshold,
compression_method,
client_throttle_enabled,
client_throttle_threshold,
client_throttle_scalar,
}
}
}