#[non_exhaustive]pub struct Command {
pub keys: Keys,
pub yaw: f32,
pub pitch: f32,
pub dig: Option<[i32; 3]>,
pub place: Option<Place>,
pub interact: Option<[i32; 3]>,
}Expand description
What the controller wants this tick.
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.keys: KeysMovement keys.
yaw: f32Aim target yaw (degrees), as returned by Controller::aim.
pitch: f32Aim target pitch (degrees).
dig: Option<[i32; 3]>Break this block (hold the left button while the crosshair is on it). The player stands still meanwhile.
place: Option<Place>Place the held block: right-click the face Place::face of Place::against
(only sent when the crosshair, from the pose the server has, is on that face).
interact: Option<[i32; 3]>Right-click this block (open a door or fence gate) when the crosshair is on it.
Trait Implementations§
impl Copy for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Forget for Command
impl Freeze for Command
impl Move for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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