Enum CrosshairTarget
#[non_exhaustive]pub enum CrosshairTarget {
Block {
pos: BlockPos,
state: BlockState,
hit: BlockHit,
},
Entity {
entity: EntityRef,
point: [f64; 3],
},
}Expand description
The client’s ordinary crosshair hit (Minecraft.hitResult), within the
current interaction ranges. Entity handles belong to the current client
level’s epoch, including dragon parts; a replacement level invalidates them.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Block
The crosshair is on a block.
Fields
§
state: BlockStateThe block’s state.
Entity
The crosshair is on an entity.
Trait Implementations§
§impl Clone for CrosshairTarget
impl Clone for CrosshairTarget
§fn clone(&self) -> CrosshairTarget
fn clone(&self) -> CrosshairTarget
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 moreimpl Copy for CrosshairTarget
§impl Debug for CrosshairTarget
impl Debug for CrosshairTarget
§impl PartialEq for CrosshairTarget
impl PartialEq for CrosshairTarget
impl StructuralPartialEq for CrosshairTarget
Auto Trait Implementations§
impl Freeze for CrosshairTarget
impl RefUnwindSafe for CrosshairTarget
impl Send for CrosshairTarget
impl Sync for CrosshairTarget
impl Unpin for CrosshairTarget
impl UnsafeUnpin for CrosshairTarget
impl UnwindSafe for CrosshairTarget
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