From e21e1b97bf9337e9f4747cd1b545b1b3a03e2ce7 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sat, 22 Feb 2025 21:45:26 -0600 Subject: Refactor azalea-client (#205) * start organizing packet_handling more by moving packet handlers into their own functions * finish writing all the handler functions for packets * use macro for generating match statement for packet handler functions * fix set_entity_data * update config state to also use handler functions * organize az-client file structure by moving things into plugins directory * fix merge issues --- azalea-client/src/local_player.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'azalea-client/src/local_player.rs') diff --git a/azalea-client/src/local_player.rs b/azalea-client/src/local_player.rs index 7e323f4c..455cc470 100644 --- a/azalea-client/src/local_player.rs +++ b/azalea-client/src/local_player.rs @@ -2,7 +2,6 @@ use std::{collections::HashMap, io, sync::Arc}; use azalea_auth::game_profile::GameProfile; use azalea_core::game_type::GameMode; -use azalea_entity::Dead; use azalea_protocol::packets::game::c_player_abilities::ClientboundPlayerAbilities; use azalea_world::{Instance, PartialInstance}; use bevy_ecs::{component::Component, prelude::*}; @@ -13,10 +12,7 @@ use tokio::sync::mpsc; use tracing::error; use uuid::Uuid; -use crate::{ - ClientInformation, PlayerInfo, - events::{Event as AzaleaEvent, LocalPlayerEvents}, -}; +use crate::{ClientInformation, PlayerInfo, events::Event as AzaleaEvent}; /// A component that keeps strong references to our [`PartialInstance`] and /// [`Instance`] for local players. @@ -150,13 +146,6 @@ impl InstanceHolder { } } -/// Send the "Death" event for [`LocalEntity`]s that died with no reason. -pub fn death_event(query: Query<&LocalPlayerEvents, Added>) { - for local_player_events in &query { - local_player_events.send(AzaleaEvent::Death(None)).unwrap(); - } -} - #[derive(Error, Debug)] pub enum HandlePacketError { #[error("{0}")] -- cgit v1.2.3