From ebaf5128fbc87970b2ba1f6157e5da035ae379c8 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 28 Dec 2024 01:48:25 +0000 Subject: better pathfinder debug messages --- azalea-physics/src/collision/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'azalea-physics/src') 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 { -- cgit v1.2.3