diff options
| author | mat <git@matdoes.dev> | 2024-12-28 01:48:25 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-12-28 01:48:25 +0000 |
| commit | ebaf5128fbc87970b2ba1f6157e5da035ae379c8 (patch) | |
| tree | 7b9ee030fd6c9551bc3c8f3695f66e9f452de8ac /azalea-physics/src | |
| parent | 5693191b57973136188bdade2144a69ac61a9f8a (diff) | |
| download | azalea-drasl-ebaf5128fbc87970b2ba1f6157e5da035ae379c8.tar.xz | |
better pathfinder debug messages
Diffstat (limited to 'azalea-physics/src')
| -rw-r--r-- | azalea-physics/src/collision/mod.rs | 9 |
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 { |
