Skip to main content

ItemClick

Struct ItemClick 

#[non_exhaustive]
pub struct ItemClick<'a> { pub side: LogicalSide, pub dimension: Dimension, pub pos: [i32; 3], pub hand: Hand, pub stack: &'a ItemStack, pub player: u128, pub player_entity_id: i32, }
Expand description

A player’s item use, including after target fallthrough (RightClickItem).

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§side: LogicalSide

The side the click is handled on.

§dimension: Dimension

The dimension the player is in.

§pos: [i32; 3]

The block containing the clicking player’s feet (getPos).

§hand: Hand

The hand that holds the stack.

§stack: &'a ItemStack

The stack in that hand.

§player: u128

The clicking player’s UUID.

§player_entity_id: i32

The clicking player’s network id.

Trait Implementations§

§

impl<'a> Clone for ItemClick<'a>

§

fn clone(&self) -> ItemClick<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<'a> Copy for ItemClick<'a>

§

impl<'a> Debug for ItemClick<'a>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'a> From<ItemClick<'a>> for ItemClick<'a>

§

fn from(v: ItemClick<'a>) -> ItemClick<'a>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for ItemClick<'a>

§

impl<'a> RefUnwindSafe for ItemClick<'a>

§

impl<'a> Send for ItemClick<'a>

§

impl<'a> Sync for ItemClick<'a>

§

impl<'a> Unpin for ItemClick<'a>

§

impl<'a> UnsafeUnpin for ItemClick<'a>

§

impl<'a> UnwindSafe for ItemClick<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.