aboutsummaryrefslogtreecommitdiff
path: root/azalea-physics/src/clip.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-09-27 18:41:36 -1030
committermat <git@matdoes.dev>2025-09-27 20:26:41 -0845
commit74dcb7b37d953ec4d45dd6aac4c8e598c87def7d (patch)
tree22e6ab1849ee01d40f3d484ea0c8db52aa6649b5 /azalea-physics/src/clip.rs
parent63bef6486dc1f3c9ef4b4f0d71e139d7035b6432 (diff)
downloadazalea-drasl-74dcb7b37d953ec4d45dd6aac4c8e598c87def7d.tar.xz
allow picking other bots in hit results
Diffstat (limited to 'azalea-physics/src/clip.rs')
-rw-r--r--azalea-physics/src/clip.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/azalea-physics/src/clip.rs b/azalea-physics/src/clip.rs
index 8d2b5dd1..dbab0da6 100644
--- a/azalea-physics/src/clip.rs
+++ b/azalea-physics/src/clip.rs
@@ -5,7 +5,7 @@ use azalea_block::{
fluid_state::{FluidKind, FluidState},
};
use azalea_core::{
- aabb::AABB,
+ aabb::Aabb,
direction::{Axis, Direction},
hit_result::BlockHitResult,
math::{self, EPSILON, lerp},
@@ -255,7 +255,7 @@ pub fn traverse_blocks<C, T>(
}
}
-pub fn box_traverse_blocks(from: Vec3, to: Vec3, aabb: &AABB) -> HashSet<BlockPos> {
+pub fn box_traverse_blocks(from: Vec3, to: Vec3, aabb: &Aabb) -> HashSet<BlockPos> {
let delta = to - from;
let traversed_blocks = BlockPos::between_closed_aabb(aabb);
if delta.length_squared() < (0.99999_f32 * 0.99999) as f64 {
@@ -279,7 +279,7 @@ pub fn add_collisions_along_travel(
collisions: &mut HashSet<BlockPos>,
from: Vec3,
to: Vec3,
- aabb: AABB,
+ aabb: Aabb,
) {
let delta = to - from;
let mut min_x = from.x.floor() as i32;
@@ -345,7 +345,7 @@ pub fn add_collisions_along_travel(
}
step_count += 1;
- let Some(clip_location) = AABB::clip_with_from_and_to(
+ let Some(clip_location) = Aabb::clip_with_from_and_to(
Vec3::new(min_x as f64, min_y as f64, min_z as f64),
Vec3::new((min_x + 1) as f64, (min_y + 1) as f64, (min_z + 1) as f64),
from,