diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2025-08-14 20:40:13 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-14 20:40:13 -0500 |
| commit | e74ed047dbaf3877db4a89a2d589e992abd0bb11 (patch) | |
| tree | 0a728c8be167a1d59a5492ed9df666f41cf12e57 /azalea-client/src/plugins/attack.rs | |
| parent | 6695132ddb31780786c67b8b9ff5df8ab3891438 (diff) | |
| download | azalea-drasl-e74ed047dbaf3877db4a89a2d589e992abd0bb11.tar.xz | |
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
Diffstat (limited to 'azalea-client/src/plugins/attack.rs')
| -rw-r--r-- | azalea-client/src/plugins/attack.rs | 10 |
1 files changed, 4 insertions, 6 deletions
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 { |
