aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/local_player.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-02-22 21:45:26 -0600
committerGitHub <noreply@github.com>2025-02-22 21:45:26 -0600
commite21e1b97bf9337e9f4747cd1b545b1b3a03e2ce7 (patch)
treeadd6f8bfce40d0c07845d8aa4c9945a0b918444c /azalea-client/src/local_player.rs
parentf8130c3c92946d2293634ba4e252d6bc93026c3c (diff)
downloadazalea-drasl-e21e1b97bf9337e9f4747cd1b545b1b3a03e2ce7.tar.xz
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
Diffstat (limited to 'azalea-client/src/local_player.rs')
-rw-r--r--azalea-client/src/local_player.rs13
1 files changed, 1 insertions, 12 deletions
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<Dead>>) {
- for local_player_events in &query {
- local_player_events.send(AzaleaEvent::Death(None)).unwrap();
- }
-}
-
#[derive(Error, Debug)]
pub enum HandlePacketError {
#[error("{0}")]