mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
31 lines
764 B
Rust
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,
|
|
}
|
|
}
|
|
}
|