pub struct TickInput {
pub keys: Keys,
pub yaw: f32,
pub pitch: f32,
pub using_item: bool,
}Expand description
Everything the player controls for one tick.
Fields§
§keys: KeysHeld keys.
yaw: f32Yaw set before the tick (vanilla applies mouse look between ticks). For packets to pass
rotation checks it should be a whole number of mouse steps from the last value; see
crate::rotation.
pitch: f32Pitch set before the tick, -90..=90.
using_item: boolAn item is in use (eating, drinking, blocking with a sword, drawing a bow): movement input is scaled by 0.2, sprinting cannot start and the sprint double-tap window resets. The use / release packets are the client’s; this is only the movement effect.
Trait Implementations§
impl Copy for TickInput
impl StructuralPartialEq for TickInput
Auto Trait Implementations§
impl Forget for TickInput
impl Freeze for TickInput
impl Move for TickInput
impl RefUnwindSafe for TickInput
impl Send for TickInput
impl Sync for TickInput
impl Unpin for TickInput
impl UnsafeUnpin for TickInput
impl UnwindSafe for TickInput
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