From d2b5a3614f4aa3542e3feb3d05fe7a4f3aec96da Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 4 Mar 2026 23:53:50 -0930 Subject: fast path for is_block_state_standable --- azalea/src/pathfinder/world.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'azalea') diff --git a/azalea/src/pathfinder/world.rs b/azalea/src/pathfinder/world.rs index fe4c76fd..9e9cce83 100644 --- a/azalea/src/pathfinder/world.rs +++ b/azalea/src/pathfinder/world.rs @@ -674,6 +674,11 @@ pub fn is_block_state_solid(block_state: BlockState) -> bool { /// Whether we can stand on this block (but not necessarily do parkour jumps /// from it). pub fn is_block_state_standable(block_state: BlockState) -> bool { + if block_state.is_air() { + // fast path + return false; + } + if is_block_state_solid(block_state) { return true; } -- cgit v1.2.3