pub struct BlockHitResult {
pub location: DVec3,
pub direction: Direction,
pub block_pos: BlockPos,
pub miss: bool,
pub inside: bool,
pub world_border_hit: bool,
}Expand description
Result of a ray cast hitting a block.
This is kept in steel-registry because it’s used by steel-protocol for packet deserialization.
Fields§
§location: DVec3The exact location where the ray hit the block.
direction: DirectionThe face of the block that was hit.
block_pos: BlockPosThe position of the block that was hit.
miss: boolWhether this is a miss (no block hit).
inside: boolWhether the hit location is inside the block.
world_border_hit: boolWhether the world border was hit.
Trait Implementations§
Source§impl Clone for BlockHitResult
impl Clone for BlockHitResult
Source§fn clone(&self) -> BlockHitResult
fn clone(&self) -> BlockHitResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockHitResult
impl Debug for BlockHitResult
Auto Trait Implementations§
impl Freeze for BlockHitResult
impl RefUnwindSafe for BlockHitResult
impl Send for BlockHitResult
impl Sync for BlockHitResult
impl Unpin for BlockHitResult
impl UnsafeUnpin for BlockHitResult
impl UnwindSafe for BlockHitResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more