diff options
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 { |
