Struct BlockHitResult
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§
§impl Clone for BlockHitResult
impl Clone for BlockHitResult
§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 more§impl Debug for BlockHitResult
impl Debug for BlockHitResult
§impl ReadFrom for BlockHitResult
impl ReadFrom 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>