aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2026-03-04 23:53:50 -0930
committermat <git@matdoes.dev>2026-03-04 23:53:50 -0930
commitd2b5a3614f4aa3542e3feb3d05fe7a4f3aec96da (patch)
tree0d1b0509f24e542cb024bfda151564f202cc4d02
parent4e338230f7145a025b1d2a0ee1538bae4aebba8c (diff)
downloadazalea-drasl-d2b5a3614f4aa3542e3feb3d05fe7a4f3aec96da.tar.xz
fast path for is_block_state_standable
-rw-r--r--azalea/src/pathfinder/world.rs5
1 files changed, 5 insertions, 0 deletions
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;
}