aboutsummaryrefslogtreecommitdiff
path: root/azalea-physics/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-12-15 14:59:26 +0700
committermat <git@matdoes.dev>2025-12-15 14:59:26 +0700
commit0569ffd2d85585eb69de9068ab3f62e768bce4e7 (patch)
treee20d7faf8df7ede4eb3f52d3223b27782a964be0 /azalea-physics/src
parent232f1a434406d77dc5ef1d19edcdf006e32491e8 (diff)
downloadazalea-drasl-0569ffd2d85585eb69de9068ab3f62e768bce4e7.tar.xz
write/update docs for several items
Diffstat (limited to 'azalea-physics/src')
-rw-r--r--azalea-physics/src/clip.rs6
-rw-r--r--azalea-physics/src/collision/blocks.rs7
2 files changed, 8 insertions, 5 deletions
diff --git a/azalea-physics/src/clip.rs b/azalea-physics/src/clip.rs
index cabcd2a6..b35857d3 100644
--- a/azalea-physics/src/clip.rs
+++ b/azalea-physics/src/clip.rs
@@ -126,11 +126,7 @@ pub fn clip(chunk_storage: &ChunkStorage, context: ClipContext) -> BlockHitResul
},
|context| {
let vec = context.from - context.to;
- BlockHitResult::miss(
- context.to,
- Direction::nearest(vec),
- BlockPos::from(context.to),
- )
+ BlockHitResult::miss(context.to, Direction::nearest(vec))
},
)
}
diff --git a/azalea-physics/src/collision/blocks.rs b/azalea-physics/src/collision/blocks.rs
index 8dc01228..2622aeb7 100644
--- a/azalea-physics/src/collision/blocks.rs
+++ b/azalea-physics/src/collision/blocks.rs
@@ -14,7 +14,14 @@ use super::VoxelShape;
use crate::collision::{self, Shapes};
pub trait BlockWithShape {
+ /// The hitbox for blocks that's used when simulating physics.
fn collision_shape(&self) -> &'static VoxelShape;
+ /// The hitbox for blocks that's used for determining whether we're looking
+ /// at it.
+ ///
+ /// This is often but not always the same as the collision shape. For
+ /// example, tall grass has a normal outline shape but an empty collision
+ /// shape.
fn outline_shape(&self) -> &'static VoxelShape;
/// Tells you whether the block has an empty shape.
///