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/interact/pick.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/interact/pick.rs')
| -rw-r--r-- | azalea-client/src/plugins/interact/pick.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/azalea-client/src/plugins/interact/pick.rs b/azalea-client/src/plugins/interact/pick.rs index cebbf905..a0a75910 100644 --- a/azalea-client/src/plugins/interact/pick.rs +++ b/azalea-client/src/plugins/interact/pick.rs @@ -5,7 +5,8 @@ use azalea_core::{ position::Vec3, }; use azalea_entity::{ - Attributes, Dead, EyeHeight, LocalEntity, LookDirection, Physics, Position, + Attributes, Dead, LocalEntity, LookDirection, Physics, Position, + dimensions::EntityDimensions, metadata::{ArmorStandMarker, Marker}, view_vector, }; @@ -31,7 +32,7 @@ pub fn update_hit_result_component( Entity, Option<&mut HitResultComponent>, &Position, - &EyeHeight, + &EntityDimensions, &LookDirection, &InstanceName, &Physics, @@ -47,7 +48,7 @@ pub fn update_hit_result_component( entity, hit_result_ref, position, - eye_height, + dimensions, look_direction, world_name, physics, @@ -57,7 +58,7 @@ pub fn update_hit_result_component( let block_pick_range = attributes.block_interaction_range.calculate(); let entity_pick_range = attributes.entity_interaction_range.calculate(); - let eye_position = position.up(eye_height.into()); + let eye_position = position.up(dimensions.eye_height.into()); let Some(world_lock) = instance_container.get(world_name) else { continue; |
