diff options
Diffstat (limited to 'azalea-physics/src/clip.rs')
| -rw-r--r-- | azalea-physics/src/clip.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/azalea-physics/src/clip.rs b/azalea-physics/src/clip.rs index e557b028..e7d203d8 100644 --- a/azalea-physics/src/clip.rs +++ b/azalea-physics/src/clip.rs @@ -151,12 +151,11 @@ fn clip_with_interaction_override( // compostors, hoppers, and scaffolding. let interaction_shape = &*EMPTY_SHAPE; let interaction_hit_result = interaction_shape.clip(from, to, block_pos); - if let Some(interaction_hit_result) = interaction_hit_result { - if interaction_hit_result.location.distance_squared_to(from) + if let Some(interaction_hit_result) = interaction_hit_result + && interaction_hit_result.location.distance_squared_to(from) < block_hit_result.location.distance_squared_to(from) - { - return Some(block_hit_result.with_direction(interaction_hit_result.direction)); - } + { + return Some(block_hit_result.with_direction(interaction_hit_result.direction)); } Some(block_hit_result) |
