From 6a5a88700c3f649fab1abc4a51f6fac9281db874 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 9 May 2025 15:00:12 -1200 Subject: fix offline-mode cert warnings and improve some docs --- azalea-client/src/plugins/chat_signing.rs | 6 +++++- azalea-client/src/plugins/interact.rs | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'azalea-client/src/plugins') diff --git a/azalea-client/src/plugins/chat_signing.rs b/azalea-client/src/plugins/chat_signing.rs index d65f4eb3..9863cb3f 100644 --- a/azalea-client/src/plugins/chat_signing.rs +++ b/azalea-client/src/plugins/chat_signing.rs @@ -94,7 +94,11 @@ pub fn request_certs_if_needed( Option<&OnlyRefreshCertsAfter>, Option<&ChatSigningSession>, ), - (Without, With), + ( + Without, + With, + With, + ), >, ) { for (entity, account, only_refresh_certs_after, chat_signing_session) in query.iter_mut() { diff --git a/azalea-client/src/plugins/interact.rs b/azalea-client/src/plugins/interact.rs index 5ec95b46..c623663e 100644 --- a/azalea-client/src/plugins/interact.rs +++ b/azalea-client/src/plugins/interact.rs @@ -85,10 +85,10 @@ impl Client { }); } - /// Use the current item. + /// Right-click the currently held item. /// /// If the item is consumable, then it'll act as if right-click was held - /// until the item finished being consumed. You can use this to eat food. + /// until the item finishes being consumed. You can use this to eat food. /// /// If we're looking at a block or entity, then it will be clicked. Also see /// [`Client::block_interact`]. @@ -163,6 +163,7 @@ pub struct StartUseItemQueued { /// it, but should be avoided to stay compatible with anticheats. pub force_block: Option, } +#[allow(clippy::type_complexity)] pub fn handle_start_use_item_queued( mut commands: Commands, query: Query<( @@ -187,7 +188,7 @@ pub fn handle_start_use_item_queued( let mut hit_result = hit_result.0.clone(); if let Some(force_block) = start_use_item.force_block { - let hit_result_matches = if let HitResult::Block(block_hit_result) = hit_result { + let hit_result_matches = if let HitResult::Block(block_hit_result) = &hit_result { block_hit_result.block_pos == force_block } else { false @@ -206,7 +207,7 @@ pub fn handle_start_use_item_queued( } } - match hit_result { + match &hit_result { HitResult::Block(block_hit_result) => { if block_hit_result.miss { commands.trigger(SendPacketEvent::new( -- cgit v1.2.3