From ad4eaa174c924c23dc06a0aea06537a078ce4c45 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 7 May 2025 15:08:31 -0545 Subject: [PATCH] doc warnings --- azalea-client/src/plugins/attack.rs | 4 ++-- azalea-client/src/plugins/events.rs | 4 ++-- azalea-client/src/plugins/tick_broadcast.rs | 3 ++- azalea/src/swarm/mod.rs | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/azalea-client/src/plugins/attack.rs b/azalea-client/src/plugins/attack.rs index 137e3375..cac2a021 100644 --- a/azalea-client/src/plugins/attack.rs +++ b/azalea-client/src/plugins/attack.rs @@ -68,10 +68,10 @@ impl Client { /// A component that indicates that this client will be attacking the given /// entity next tick. #[derive(Component, Clone, Debug)] -struct AttackQueued { +pub struct AttackQueued { pub target: MinecraftEntityId, } -fn handle_attack_queued( +pub fn handle_attack_queued( mut commands: Commands, mut query: Query<( Entity, diff --git a/azalea-client/src/plugins/events.rs b/azalea-client/src/plugins/events.rs index 97094db5..090b9d0d 100644 --- a/azalea-client/src/plugins/events.rs +++ b/azalea-client/src/plugins/events.rs @@ -1,5 +1,5 @@ -//! Defines the [`Event`] enum and makes those events trigger when they're sent -//! in the ECS. +//! Defines the [`enum@Event`] enum and makes those events trigger when they're +//! sent in the ECS. use std::sync::Arc; diff --git a/azalea-client/src/plugins/tick_broadcast.rs b/azalea-client/src/plugins/tick_broadcast.rs index 424e1bf3..b55b9921 100644 --- a/azalea-client/src/plugins/tick_broadcast.rs +++ b/azalea-client/src/plugins/tick_broadcast.rs @@ -37,7 +37,8 @@ pub fn send_tick_broadcast(tick_broadcast: ResMut) { pub fn send_update_broadcast(update_broadcast: ResMut) { let _ = update_broadcast.0.send(()); } -/// A plugin that makes the [`RanScheduleBroadcast`] resource available. +/// A plugin that makes the [`UpdateBroadcast`] and [`TickBroadcast`] resources +/// available. pub struct TickBroadcastPlugin; impl Plugin for TickBroadcastPlugin { fn build(&self, app: &mut App) { diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs index e78091df..58742eaa 100644 --- a/azalea/src/swarm/mod.rs +++ b/azalea/src/swarm/mod.rs @@ -161,8 +161,8 @@ impl SwarmBuilder where SS: Default + Send + Sync + Clone + Resource + 'static, { - /// Set the function that's called every time a bot receives an [`Event`]. - /// This is the way to handle normal per-bot events. + /// Set the function that's called every time a bot receives an + /// [`enum@Event`]. This is the way to handle normal per-bot events. /// /// Currently you can have up to one handler. ///