logging
This commit is contained in:
parent
59efaa2861
commit
b7231a1ce4
270
Cargo.lock
generated
270
Cargo.lock
generated
@ -8,6 +8,15 @@ version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "1.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "android-tzdata"
|
||||
version = "0.1.1"
|
||||
@ -23,6 +32,56 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstream"
|
||||
version = "0.6.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"anstyle-parse",
|
||||
"anstyle-query",
|
||||
"anstyle-wincon",
|
||||
"colorchoice",
|
||||
"is_terminal_polyfill",
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle"
|
||||
version = "1.0.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-parse"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
|
||||
dependencies = [
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-query"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
|
||||
dependencies = [
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-wincon"
|
||||
version = "3.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"once_cell",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "approx"
|
||||
version = "0.5.1"
|
||||
@ -96,6 +155,33 @@ dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "colog"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c426b7af8d5e0ad79de6713996632ce31f0d68ba84068fb0d654b396e519df0"
|
||||
dependencies = [
|
||||
"colored",
|
||||
"env_logger",
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "colorchoice"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
|
||||
|
||||
[[package]]
|
||||
name = "colored"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core-foundation-sys"
|
||||
version = "0.8.7"
|
||||
@ -162,6 +248,29 @@ version = "1.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
||||
|
||||
[[package]]
|
||||
name = "env_filter"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.11.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
"env_filter",
|
||||
"jiff",
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "equivalent"
|
||||
version = "1.0.2"
|
||||
@ -272,6 +381,12 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "is_terminal_polyfill"
|
||||
version = "1.70.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.14.0"
|
||||
@ -287,6 +402,30 @@ version = "1.0.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
|
||||
|
||||
[[package]]
|
||||
name = "jiff"
|
||||
version = "0.2.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "27e77966151130221b079bcec80f1f34a9e414fa489d99152a201c07fd2182bc"
|
||||
dependencies = [
|
||||
"jiff-static",
|
||||
"log",
|
||||
"portable-atomic",
|
||||
"portable-atomic-util",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jiff-static"
|
||||
version = "0.2.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "97265751f8a9a4228476f2fc17874a9e7e70e96b893368e42619880fe143b48a"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.77"
|
||||
@ -297,6 +436,12 @@ dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.172"
|
||||
@ -411,6 +556,21 @@ dependencies = [
|
||||
"siphasher",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "portable-atomic"
|
||||
version = "1.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
|
||||
|
||||
[[package]]
|
||||
name = "portable-atomic-util"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507"
|
||||
dependencies = [
|
||||
"portable-atomic",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "powerfmt"
|
||||
version = "0.2.0"
|
||||
@ -450,6 +610,35 @@ version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-automata",
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.4.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.8.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
||||
|
||||
[[package]]
|
||||
name = "rust_mc_proto"
|
||||
version = "0.1.19"
|
||||
@ -464,8 +653,10 @@ dependencies = [
|
||||
name = "rust_minecraft_server"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"colog",
|
||||
"fastnbt",
|
||||
"itertools",
|
||||
"log",
|
||||
"palette",
|
||||
"rust_mc_proto",
|
||||
"serde",
|
||||
@ -686,6 +877,12 @@ version = "1.0.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
|
||||
|
||||
[[package]]
|
||||
name = "utf8parse"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
version = "1.16.0"
|
||||
@ -809,6 +1006,79 @@ dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.59.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm",
|
||||
"windows_aarch64_msvc",
|
||||
"windows_i686_gnu",
|
||||
"windows_i686_gnullvm",
|
||||
"windows_i686_msvc",
|
||||
"windows_x86_64_gnu",
|
||||
"windows_x86_64_gnullvm",
|
||||
"windows_x86_64_msvc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.7.8"
|
||||
|
@ -13,3 +13,5 @@ toml = "0.8.22"
|
||||
itertools = "0.14.0"
|
||||
palette = "0.7.6"
|
||||
fastnbt = "2.5.0"
|
||||
colog = "1.3.0"
|
||||
log = "0.4.27"
|
||||
|
100
src/main.rs
100
src/main.rs
@ -2,6 +2,7 @@ use std::{env::args, io::Read, net::TcpListener, path::PathBuf, sync::Arc, threa
|
||||
|
||||
use config::Config;
|
||||
use context::{ClientContext, Listener, PacketHandler, ServerContext};
|
||||
use log::{debug, error, info};
|
||||
use rust_mc_proto::{DataReader, DataWriter, MinecraftConnection, Packet};
|
||||
|
||||
use data::{ServerError, TextComponent};
|
||||
@ -76,12 +77,14 @@ impl PacketHandler for ExamplePacketHandler {}
|
||||
|
||||
|
||||
fn main() {
|
||||
colog::init();
|
||||
|
||||
// Получение аргументов
|
||||
let exec = args().next().expect("Неизвестная система");
|
||||
let args = args().skip(1).collect::<Vec<String>>();
|
||||
|
||||
if args.len() > 1 {
|
||||
println!("Использование: {exec} [путь до файла конфигурации]");
|
||||
info!("Использование: {exec} [путь до файла конфигурации]");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -92,7 +95,7 @@ fn main() {
|
||||
let config = match Config::load_from_file(config_path) {
|
||||
Some(config) => config,
|
||||
None => {
|
||||
println!("Ошибка чтения конфигурации");
|
||||
error!("Ошибка чтения конфигурации");
|
||||
return;
|
||||
},
|
||||
};
|
||||
@ -114,17 +117,17 @@ fn main() {
|
||||
|
||||
// Биндим сервер где надо
|
||||
let Ok(listener) = TcpListener::bind(&server.config.bind.host) else {
|
||||
println!("Не удалось забиндить сервер на {}", &server.config.bind.host);
|
||||
error!("Не удалось забиндить сервер на {}", &server.config.bind.host);
|
||||
return;
|
||||
};
|
||||
|
||||
println!("Сервер запущен на {}", &server.config.bind.host);
|
||||
info!("Сервер запущен на {}", &server.config.bind.host);
|
||||
|
||||
while let Ok((stream, addr)) = listener.accept() {
|
||||
let server = server.clone();
|
||||
|
||||
thread::spawn(move || {
|
||||
println!("Подключение: {}", addr);
|
||||
info!("Подключение: {}", addr);
|
||||
|
||||
// Установка таймаутов на чтение и запись
|
||||
// По умолчанию пусть будет 5 секунд, надо будет сделать настройку через конфиг
|
||||
@ -143,11 +146,11 @@ fn main() {
|
||||
match handle_connection(client) {
|
||||
Ok(_) => {},
|
||||
Err(error) => {
|
||||
println!("Ошибка подключения: {error:?}");
|
||||
error!("Ошибка подключения: {error:?}");
|
||||
},
|
||||
};
|
||||
|
||||
println!("Отключение: {}", addr);
|
||||
info!("Отключение: {}", addr);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -170,6 +173,11 @@ fn handle_connection(
|
||||
let server_port = packet.read_unsigned_short()?; // Все тоже самое что и с адресом сервера и все потому же и за тем же
|
||||
let next_state = packet.read_varint()?; // Тип подключения: 1 для получения статуса и пинга, 2 и 3 для обычного подключения
|
||||
|
||||
debug!("protocol_version: {protocol_version}");
|
||||
debug!("server_address: {server_address}");
|
||||
debug!("server_port: {server_port}");
|
||||
debug!("next_state: {next_state}");
|
||||
|
||||
client.handshake(protocol_version, server_address, server_port);
|
||||
|
||||
match next_state {
|
||||
@ -223,6 +231,9 @@ fn handle_connection(
|
||||
let player_name = packet.read_string()?;
|
||||
let player_uuid = packet.read_uuid()?;
|
||||
|
||||
debug!("name: {player_name}");
|
||||
debug!("uuid: {player_uuid}");
|
||||
|
||||
if client.server.config.server.online_mode {
|
||||
// TODO: encryption packets
|
||||
}
|
||||
@ -248,45 +259,58 @@ fn handle_connection(
|
||||
|
||||
// Мы перешли в режим Configuration
|
||||
|
||||
let mut packet = client.conn().read_packet()?;
|
||||
// Получение бренда клиента из Serverbound Plugin Message
|
||||
// Identifier канала откуда берется бренд: minecraft:brand
|
||||
let brand = loop {
|
||||
let mut packet = client.conn().read_packet()?;
|
||||
|
||||
if packet.id() == 0x02 { // Пакет Serverbound Plugin Message
|
||||
let identifier = packet.read_string()?;
|
||||
let mut data = Vec::new();
|
||||
packet.get_mut().read_to_end(&mut data).unwrap();
|
||||
if packet.id() == 0x02 { // Пакет Serverbound Plugin Message
|
||||
let identifier = packet.read_string()?;
|
||||
|
||||
// TODO: Сделать запись всех этих полезных данных в клиент контекст
|
||||
let mut data = Vec::new();
|
||||
packet.get_mut().read_to_end(&mut data).unwrap();
|
||||
|
||||
println!("got plugin message: {}", identifier);
|
||||
}
|
||||
if identifier == "minecraft:brand" {
|
||||
break String::from_utf8_lossy(&data).to_string();
|
||||
} else {
|
||||
error!("unknown plugin message channel: {}", identifier);
|
||||
}
|
||||
} else {
|
||||
return Err(ServerError::UnknownPacket(format!("Неизвестный пакет при ожидании Serverbound Plugin Message")));
|
||||
};
|
||||
};
|
||||
|
||||
debug!("brand: {brand}");
|
||||
|
||||
let mut packet = client.conn().read_packet()?;
|
||||
|
||||
if packet.id() == 0x00 { // Пакет Serverbound Plugin Message
|
||||
let locale = packet.read_string()?; // for example: ru_RU
|
||||
let view_distance = packet.read_signed_byte()?; // client-side render distance in chunks
|
||||
let chat_mode = packet.read_varint()?; // 0: enabled, 1: commands only, 2: hidden. See Chat#Client chat mode for more information.
|
||||
let chat_colors = packet.read_boolean()?; // this settings does nothing on client but can be used on serverside
|
||||
let displayed_skin_parts = packet.read_byte()?; // bit mask https://minecraft.wiki/w/Java_Edition_protocol#Client_Information_(configuration)
|
||||
let main_hand = packet.read_varint()?; // 0 for left and 1 for right
|
||||
let enable_text_filtering = packet.read_boolean()?; // filtering text for profanity, always false for offline mode
|
||||
let allow_server_listings = packet.read_boolean()?; // allows showing player in server listings in status
|
||||
let particle_status = packet.read_varint()?; // 0 for all, 1 for decreased, 2 for minimal
|
||||
|
||||
// TODO: Сделать запись всех этих полезных данных в клиент контекст
|
||||
|
||||
println!("got client information:");
|
||||
println!("locale: {locale}");
|
||||
println!("view_distance: {view_distance}");
|
||||
println!("chat_mode: {chat_mode}");
|
||||
println!("chat_colors: {chat_colors}");
|
||||
println!("displayed_skin_parts: {displayed_skin_parts}");
|
||||
println!("main_hand: {main_hand}");
|
||||
println!("enable_text_filtering: {enable_text_filtering}");
|
||||
println!("allow_server_listings: {allow_server_listings}");
|
||||
println!("particle_status: {particle_status}");
|
||||
// Пакет Client Information
|
||||
if packet.id() != 0x00 {
|
||||
return Err(ServerError::UnknownPacket(format!("Неизвестный пакет при ожидании Client Information")));
|
||||
}
|
||||
|
||||
let locale = packet.read_string()?; // for example: ru_RU
|
||||
let view_distance = packet.read_signed_byte()?; // client-side render distance in chunks
|
||||
let chat_mode = packet.read_varint()?; // 0: enabled, 1: commands only, 2: hidden. See Chat#Client chat mode for more information.
|
||||
let chat_colors = packet.read_boolean()?; // this settings does nothing on client but can be used on serverside
|
||||
let displayed_skin_parts = packet.read_byte()?; // bit mask https://minecraft.wiki/w/Java_Edition_protocol#Client_Information_(configuration)
|
||||
let main_hand = packet.read_varint()?; // 0 for left and 1 for right
|
||||
let enable_text_filtering = packet.read_boolean()?; // filtering text for profanity, always false for offline mode
|
||||
let allow_server_listings = packet.read_boolean()?; // allows showing player in server listings in status
|
||||
let particle_status = packet.read_varint()?; // 0 for all, 1 for decreased, 2 for minimal
|
||||
|
||||
// TODO: Сделать запись всех этих полезных данных в клиент контекст
|
||||
|
||||
debug!("locale: {locale}");
|
||||
debug!("view_distance: {view_distance}");
|
||||
debug!("chat_mode: {chat_mode}");
|
||||
debug!("chat_colors: {chat_colors}");
|
||||
debug!("displayed_skin_parts: {displayed_skin_parts}");
|
||||
debug!("main_hand: {main_hand}");
|
||||
debug!("enable_text_filtering: {enable_text_filtering}");
|
||||
debug!("allow_server_listings: {allow_server_listings}");
|
||||
debug!("particle_status: {particle_status}");
|
||||
|
||||
// TODO: Заюзать Listener'ы чтобы они подмешивали сюда чото
|
||||
|
||||
client.conn().write_packet(&Packet::empty(0x03))?;
|
||||
|
Loading…
Reference in New Issue
Block a user