diff options
| author | mat <git@matdoes.dev> | 2025-05-10 06:22:08 +0330 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-05-10 06:22:08 +0330 |
| commit | e1d3b902ba08170e4ee82c53f216445f57fbc47e (patch) | |
| tree | e383f7bb54edf654016a5c370786e6cb67ed28c4 /azalea-core/src/block_hit_result.rs | |
| parent | e9b3128103d203ad4902a40124e4d22a012c196a (diff) | |
| download | azalea-drasl-e1d3b902ba08170e4ee82c53f216445f57fbc47e.tar.xz | |
add StartUseItemEvent and improve code related to interactions
Diffstat (limited to 'azalea-core/src/block_hit_result.rs')
| -rw-r--r-- | azalea-core/src/block_hit_result.rs | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/azalea-core/src/block_hit_result.rs b/azalea-core/src/block_hit_result.rs deleted file mode 100644 index 4d930453..00000000 --- a/azalea-core/src/block_hit_result.rs +++ /dev/null @@ -1,34 +0,0 @@ -use crate::{ - direction::Direction, - position::{BlockPos, Vec3}, -}; - -#[derive(Debug, Clone, Copy, PartialEq)] -pub struct BlockHitResult { - pub location: Vec3, - pub direction: Direction, - pub block_pos: BlockPos, - pub miss: bool, - pub inside: bool, - pub world_border: bool, -} - -impl BlockHitResult { - pub fn miss(location: Vec3, direction: Direction, block_pos: BlockPos) -> Self { - Self { - location, - direction, - block_pos, - miss: true, - inside: false, - world_border: false, - } - } - - pub fn with_direction(&self, direction: Direction) -> Self { - Self { direction, ..*self } - } - pub fn with_position(&self, block_pos: BlockPos) -> Self { - Self { block_pos, ..*self } - } -} |
