From f03e0c22355778a9863cccb5a59d852278d60701 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 24 Dec 2024 08:48:36 +0000 Subject: fix parsing Dust particle and treat waterlogged blocks as liquid in pathfinder --- azalea-block/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-block/src') diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index c1655919..3de0aa5a 100755 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -56,7 +56,7 @@ impl BlockState { #[inline] pub fn is_valid_state(state_id: u32) -> bool { - state_id <= Self::max_state() + state_id <= Self::MAX_STATE } /// Returns true if the block is air. This only checks for normal air, not @@ -184,8 +184,8 @@ mod tests { fn test_from_u32() { assert_eq!(BlockState::try_from(0).unwrap(), BlockState::AIR); - assert!(BlockState::try_from(BlockState::max_state()).is_ok()); - assert!(BlockState::try_from(BlockState::max_state() + 1).is_err()); + assert!(BlockState::try_from(BlockState::MAX_STATE).is_ok()); + assert!(BlockState::try_from(BlockState::MAX_STATE + 1).is_err()); } #[test] -- cgit v1.2.3