aboutsummaryrefslogtreecommitdiff
path: root/azalea-block/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-02-25 22:31:56 -0600
committermat <git@matdoes.dev>2024-02-25 22:31:56 -0600
commite47dee388e1e7f051417244ab1c054f8b9acd755 (patch)
tree41c369fdcd967dc795ea66cb3a6c982c3dfd2d2f /azalea-block/src
parent018ab55bdb02e7774044198c8a30e0d02a7c6e29 (diff)
downloadazalea-drasl-e47dee388e1e7f051417244ab1c054f8b9acd755.tar.xz
reduce allocations for collision detection
Diffstat (limited to 'azalea-block/src')
-rwxr-xr-xazalea-block/src/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs
index dc41b405..2a46fd01 100755
--- a/azalea-block/src/lib.rs
+++ b/azalea-block/src/lib.rs
@@ -59,6 +59,8 @@ impl BlockState {
state_id <= Self::max_state()
}
+ /// Returns true if the block is air. This only checks for normal air, not
+ /// other types like cave air.
#[inline]
pub fn is_air(&self) -> bool {
self == &Self::AIR