aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins/brand.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-04-05 01:46:14 +0330
committermat <git@matdoes.dev>2025-04-05 01:46:14 +0330
commitefc28db6cfa3cf45561610dcba9b2819553aa025 (patch)
tree2a58147b500b760cf024b6a62cd907321c476047 /azalea-client/src/plugins/brand.rs
parentf250978cdd789d8ceb10cb225970a408933f508b (diff)
downloadazalea-drasl-efc28db6cfa3cf45561610dcba9b2819553aa025.tar.xz
remove unnecessary ecs system ordering for handle_outgoing_packets
Diffstat (limited to 'azalea-client/src/plugins/brand.rs')
-rw-r--r--azalea-client/src/plugins/brand.rs11
1 files changed, 4 insertions, 7 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(),