From e74ed047dbaf3877db4a89a2d589e992abd0bb11 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Thu, 14 Aug 2025 20:40:13 -0500 Subject: Sneaking (#237) * start implementing sneaking * fix horizontal_collision being inverted and cleanup * clippy * change dimensions and eye height based on pose * proper support for automatically crouching in certain cases * fix anticheat issues * add line to changelog and update a comment --- azalea-client/src/plugins/attack.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'azalea-client/src/plugins/attack.rs') diff --git a/azalea-client/src/plugins/attack.rs b/azalea-client/src/plugins/attack.rs index ec4337e5..7d730bb7 100644 --- a/azalea-client/src/plugins/attack.rs +++ b/azalea-client/src/plugins/attack.rs @@ -1,8 +1,6 @@ use azalea_core::{game_type::GameMode, tick::GameTick}; use azalea_entity::{ - Attributes, Physics, - indexing::EntityIdIndex, - metadata::{ShiftKeyDown, Sprinting}, + Attributes, Crouching, Physics, indexing::EntityIdIndex, metadata::Sprinting, update_bounding_box, }; use azalea_physics::PhysicsSet; @@ -100,7 +98,7 @@ pub fn handle_attack_queued( &mut Sprinting, &AttackQueued, &LocalGameMode, - &ShiftKeyDown, + &Crouching, &EntityIdIndex, )>, ) { @@ -111,7 +109,7 @@ pub fn handle_attack_queued( mut sprinting, attack_queued, game_mode, - sneaking, + crouching, entity_id_index, ) in &mut query { @@ -128,7 +126,7 @@ pub fn handle_attack_queued( ServerboundInteract { entity_id: target_entity_id, action: s_interact::ActionType::Attack, - using_secondary_action: **sneaking, + using_secondary_action: **crouching, }, )); commands.trigger(SwingArmEvent { -- cgit v1.2.3