aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-client/src/plugins')
-rw-r--r--azalea-client/src/plugins/brand.rs11
-rw-r--r--azalea-client/src/plugins/chat/mod.rs7
-rw-r--r--azalea-client/src/plugins/chunks.rs2
-rw-r--r--azalea-client/src/plugins/interact.rs2
-rw-r--r--azalea-client/src/plugins/inventory.rs3
-rw-r--r--azalea-client/src/plugins/respawn.rs3
6 files changed, 7 insertions, 21 deletions
diff --git a/azalea-client/src/plugins/brand.rs b/azalea-client/src/plugins/brand.rs
index 94783230..cf179e71 100644
--- a/azalea-client/src/plugins/brand.rs
+++ b/azalea-client/src/plugins/brand.rs
@@ -17,24 +17,21 @@ use crate::packet::login::InLoginState;
pub struct BrandPlugin;
impl Plugin for BrandPlugin {
fn build(&self, app: &mut App) {
- app.add_systems(
- Update,
- handle_end_login_state.before(crate::packet::config::handle_outgoing_packets),
- );
+ app.add_systems(Update, handle_end_login_state);
}
}
pub fn handle_end_login_state(
+ mut commands: Commands,
mut removed: RemovedComponents<InLoginState>,
query: Query<&ClientInformation>,
- mut send_packet_events: EventWriter<SendConfigPacketEvent>,
) {
for entity in removed.read() {
let mut brand_data = Vec::new();
// azalea pretends to be vanilla everywhere else so it makes sense to lie here
// too
"vanilla".azalea_write(&mut brand_data).unwrap();
- send_packet_events.send(SendConfigPacketEvent::new(
+ commands.trigger(SendConfigPacketEvent::new(
entity,
ServerboundCustomPayload {
identifier: ResourceLocation::new("brand"),
@@ -53,7 +50,7 @@ pub fn handle_end_login_state(
};
debug!("Writing ClientInformation while in config state: {client_information:?}");
- send_packet_events.send(SendConfigPacketEvent::new(
+ commands.trigger(SendConfigPacketEvent::new(
entity,
ServerboundClientInformation {
information: client_information.clone(),
diff --git a/azalea-client/src/plugins/chat/mod.rs b/azalea-client/src/plugins/chat/mod.rs
index 1e083c94..3d03d24e 100644
--- a/azalea-client/src/plugins/chat/mod.rs
+++ b/azalea-client/src/plugins/chat/mod.rs
@@ -19,7 +19,6 @@ use bevy_ecs::{
use handler::{SendChatKindEvent, handle_send_chat_kind_event};
use uuid::Uuid;
-use super::packet::game::handle_outgoing_packets;
use crate::client::Client;
pub struct ChatPlugin;
@@ -30,11 +29,7 @@ impl Plugin for ChatPlugin {
.add_event::<ChatReceivedEvent>()
.add_systems(
Update,
- (
- handle_send_chat_event,
- handle_send_chat_kind_event.after(handle_outgoing_packets),
- )
- .chain(),
+ (handle_send_chat_event, handle_send_chat_kind_event).chain(),
);
}
}
diff --git a/azalea-client/src/plugins/chunks.rs b/azalea-client/src/plugins/chunks.rs
index 060b94e2..5599d7c9 100644
--- a/azalea-client/src/plugins/chunks.rs
+++ b/azalea-client/src/plugins/chunks.rs
@@ -16,7 +16,6 @@ use bevy_app::{App, Plugin, Update};
use bevy_ecs::prelude::*;
use tracing::{error, trace};
-use super::packet::game::handle_outgoing_packets;
use crate::{
InstanceHolder, interact::handle_block_interact_event, inventory::InventorySet,
packet::game::SendPacketEvent, respawn::perform_respawn,
@@ -33,7 +32,6 @@ impl Plugin for ChunksPlugin {
handle_chunk_batch_finished_event,
)
.chain()
- .before(handle_outgoing_packets)
.before(InventorySet)
.before(handle_block_interact_event)
.before(perform_respawn),
diff --git a/azalea-client/src/plugins/interact.rs b/azalea-client/src/plugins/interact.rs
index f7239c17..9e638a06 100644
--- a/azalea-client/src/plugins/interact.rs
+++ b/azalea-client/src/plugins/interact.rs
@@ -31,7 +31,6 @@ use bevy_ecs::{
use derive_more::{Deref, DerefMut};
use tracing::warn;
-use super::packet::game::handle_outgoing_packets;
use crate::{
Client,
attack::handle_attack_event,
@@ -56,7 +55,6 @@ impl Plugin for InteractPlugin {
handle_block_interact_event,
handle_swing_arm_event,
)
- .before(handle_outgoing_packets)
.after(InventorySet)
.after(perform_respawn)
.after(handle_attack_event)
diff --git a/azalea-client/src/plugins/inventory.rs b/azalea-client/src/plugins/inventory.rs
index 844dd248..e6394ab8 100644
--- a/azalea-client/src/plugins/inventory.rs
+++ b/azalea-client/src/plugins/inventory.rs
@@ -26,7 +26,6 @@ use bevy_ecs::{
};
use tracing::{error, warn};
-use super::packet::game::handle_outgoing_packets;
use crate::{
Client, local_player::PlayerAbilities, packet::game::SendPacketEvent, respawn::perform_respawn,
};
@@ -47,7 +46,7 @@ impl Plugin for InventoryPlugin {
handle_menu_opened_event,
handle_set_container_content_event,
handle_container_click_event,
- handle_container_close_event.before(handle_outgoing_packets),
+ handle_container_close_event,
handle_client_side_close_container_event,
)
.chain()
diff --git a/azalea-client/src/plugins/respawn.rs b/azalea-client/src/plugins/respawn.rs
index 24479805..f0ddd2b8 100644
--- a/azalea-client/src/plugins/respawn.rs
+++ b/azalea-client/src/plugins/respawn.rs
@@ -2,7 +2,6 @@ use azalea_protocol::packets::game::s_client_command::{self, ServerboundClientCo
use bevy_app::{App, Plugin, Update};
use bevy_ecs::prelude::*;
-use super::packet::game::handle_outgoing_packets;
use crate::packet::game::SendPacketEvent;
/// Tell the server that we're respawning.
@@ -16,7 +15,7 @@ pub struct RespawnPlugin;
impl Plugin for RespawnPlugin {
fn build(&self, app: &mut App) {
app.add_event::<PerformRespawnEvent>()
- .add_systems(Update, perform_respawn.before(handle_outgoing_packets));
+ .add_systems(Update, perform_respawn);
}
}