aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins/pong.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-09-28 13:10:04 -0545
committermat <git@matdoes.dev>2025-09-28 13:10:04 -0545
commit2c8b7c5c2c9297273abfba8f7743f1bc25f166b1 (patch)
tree3d3aded400100c136287fa59293ce26c61644d00 /azalea-client/src/plugins/pong.rs
parente2ed19c1ed92f0dccc881d835d9ac6e0f7f834c0 (diff)
downloadazalea-drasl-2c8b7c5c2c9297273abfba8f7743f1bc25f166b1.tar.xz
upgrade bevy to 0.17.0-rc.2
Diffstat (limited to 'azalea-client/src/plugins/pong.rs')
-rw-r--r--azalea-client/src/plugins/pong.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/azalea-client/src/plugins/pong.rs b/azalea-client/src/plugins/pong.rs
index e23b5245..f268a836 100644
--- a/azalea-client/src/plugins/pong.rs
+++ b/azalea-client/src/plugins/pong.rs
@@ -1,3 +1,4 @@
+use azalea_protocol::packets::{config, game};
use bevy_app::{App, Plugin};
use bevy_ecs::prelude::*;
@@ -22,16 +23,16 @@ impl Plugin for PongPlugin {
}
}
-pub fn reply_to_game_ping(trigger: Trigger<PingEvent>, mut commands: Commands) {
+pub fn reply_to_game_ping(ping: On<PingEvent>, mut commands: Commands) {
commands.trigger(SendPacketEvent::new(
- trigger.target(),
- azalea_protocol::packets::game::ServerboundPong { id: trigger.0.id },
+ ping.entity,
+ game::ServerboundPong { id: ping.packet.id },
));
}
-pub fn reply_to_config_ping(trigger: Trigger<ConfigPingEvent>, mut commands: Commands) {
+pub fn reply_to_config_ping(ping: On<ConfigPingEvent>, mut commands: Commands) {
commands.trigger(SendConfigPacketEvent::new(
- trigger.target(),
- azalea_protocol::packets::config::ServerboundPong { id: trigger.0.id },
+ ping.entity,
+ config::ServerboundPong { id: ping.packet.id },
));
}