handle_configuration_state

This commit is contained in:
MeexReay 2025-05-03 20:48:18 +03:00
parent c4b4e0fd69
commit ced3cc0a2e
2 changed files with 9 additions and 3 deletions

View File

@ -8,7 +8,7 @@ use rust_mc_proto::{DataReader, DataWriter, Packet};
use crate::trigger_event;
use super::{ConnectionState, id::*, play::handle_play_state};
use super::{id::*, play::{handle_configuration_state, handle_play_state}, ConnectionState};
pub fn handle_connection(
client: Arc<ClientContext>, // Контекст клиента
@ -157,7 +157,7 @@ pub fn handle_connection(
particle_status,
});
// TODO: Заюзать Listener'ы чтобы они подмешивали сюда чото
handle_configuration_state(client.clone())?;
client.write_packet(&Packet::empty(clientbound::configuration::FINISH))?;
client.read_packet(serverbound::configuration::ACKNOWLEDGE_FINISH)?;

View File

@ -3,11 +3,17 @@ use std::sync::Arc;
use rust_mc_proto::{DataWriter, Packet};
use crate::server::{
ServerError, data::text_component::TextComponent, player::context::ClientContext,
ServerError, player::context::ClientContext,
};
use super::id::clientbound;
pub fn handle_configuration_state(
client: Arc<ClientContext>, // Контекст клиента
) -> Result<(), ServerError> {
Ok(())
}
// Отдельная функция для работы с самой игрой
pub fn handle_play_state(
client: Arc<ClientContext>, // Контекст клиента