diff options
| author | mat <git@matdoes.dev> | 2025-06-11 16:55:33 +1100 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-06-11 16:55:33 +1100 |
| commit | 9b0bd29db4faa9d94df0cec472346b814e7efcb9 (patch) | |
| tree | 4f681b5143eb5ebe69a0b5b53125ea7509f8026a /azalea-physics/src/clip.rs | |
| parent | 2a6ac0764fe9975f9b16d495ce773e4ae1f097e0 (diff) | |
| download | azalea-drasl-9b0bd29db4faa9d94df0cec472346b814e7efcb9.tar.xz | |
take BlockPos instead of &BlockPos in all function arguments
Diffstat (limited to 'azalea-physics/src/clip.rs')
| -rw-r--r-- | azalea-physics/src/clip.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/azalea-physics/src/clip.rs b/azalea-physics/src/clip.rs index e7d203d8..2cef15c4 100644 --- a/azalea-physics/src/clip.rs +++ b/azalea-physics/src/clip.rs @@ -49,7 +49,7 @@ impl ClipContext { &self, fluid_state: FluidState, world: &ChunkStorage, - pos: &BlockPos, + pos: BlockPos, ) -> &VoxelShape { if self.fluid_pick_type.can_pick(&fluid_state) { crate::collision::fluid_shape(&fluid_state, world, pos) @@ -139,7 +139,7 @@ pub fn clip(chunk_storage: &ChunkStorage, context: ClipContext) -> BlockHitResul fn clip_with_interaction_override( from: &Vec3, to: &Vec3, - block_pos: &BlockPos, + block_pos: BlockPos, block_shape: &VoxelShape, _block_state: &BlockState, ) -> Option<BlockHitResult> { @@ -168,7 +168,7 @@ pub fn traverse_blocks<C, T>( from: Vec3, to: Vec3, context: C, - get_hit_result: impl Fn(&C, &BlockPos) -> Option<T>, + get_hit_result: impl Fn(&C, BlockPos) -> Option<T>, get_miss_result: impl Fn(&C) -> T, ) -> T { if from == to { @@ -188,7 +188,7 @@ pub fn traverse_blocks<C, T>( }; let mut current_block = BlockPos::from(right_before_start); - if let Some(data) = get_hit_result(&context, ¤t_block) { + if let Some(data) = get_hit_result(&context, current_block) { return data; } @@ -249,7 +249,7 @@ pub fn traverse_blocks<C, T>( percentage.z += percentage_step.z; } - if let Some(data) = get_hit_result(&context, ¤t_block) { + if let Some(data) = get_hit_result(&context, current_block) { return data; } } |
