aboutsummaryrefslogtreecommitdiff
path: root/azalea-physics/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-12-28 01:48:25 +0000
committermat <git@matdoes.dev>2024-12-28 01:48:25 +0000
commitebaf5128fbc87970b2ba1f6157e5da035ae379c8 (patch)
tree7b9ee030fd6c9551bc3c8f3695f66e9f452de8ac /azalea-physics/src
parent5693191b57973136188bdade2144a69ac61a9f8a (diff)
downloadazalea-drasl-ebaf5128fbc87970b2ba1f6157e5da035ae379c8.tar.xz
better pathfinder debug messages
Diffstat (limited to 'azalea-physics/src')
-rw-r--r--azalea-physics/src/collision/mod.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/azalea-physics/src/collision/mod.rs b/azalea-physics/src/collision/mod.rs
index bff9d6f8..39fc43f8 100644
--- a/azalea-physics/src/collision/mod.rs
+++ b/azalea-physics/src/collision/mod.rs
@@ -356,6 +356,10 @@ pub fn fluid_shape(
return &BLOCK_SHAPE;
}
}
+ if fluid.amount > 9 {
+ warn!("Tried to calculate shape for fluid with height > 9: {fluid:?} at {pos}");
+ return &EMPTY_SHAPE;
+ }
// pre-calculate these in a LazyLock so this function can return a
// reference instead
@@ -375,11 +379,6 @@ pub fn fluid_shape(
]
});
- if fluid.amount > 9 {
- warn!("Tried to calculate shape for fluid with height > 9: {fluid:?} at {pos}");
- return &EMPTY_SHAPE;
- }
-
&FLUID_SHAPES[fluid.amount as usize]
}
fn calculate_shape_for_fluid(amount: u8) -> VoxelShape {