diff options
| author | mat <git@matdoes.dev> | 2024-12-24 08:48:36 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-12-24 08:48:36 +0000 |
| commit | f03e0c22355778a9863cccb5a59d852278d60701 (patch) | |
| tree | f02e7ca3d1e975d486071934a6322d372b7c9a02 /azalea-block/src | |
| parent | de5a53ce08de5b9d77bce99dd9ecde3171ebd74e (diff) | |
| download | azalea-drasl-f03e0c22355778a9863cccb5a59d852278d60701.tar.xz | |
fix parsing Dust particle and treat waterlogged blocks as liquid in pathfinder
Diffstat (limited to 'azalea-block/src')
| -rwxr-xr-x | azalea-block/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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] |
