Struct PlayerActionSetup
#[non_exhaustive]pub struct PlayerActionSetup {
pub stack: Option<ItemStack>,
pub eye: [f64; 3],
pub yaw: f32,
pub pitch: f32,
pub secondary_use: bool,
}Expand description
Temporary state for PlayerRef::perform_action_scoped. The existing fake acts in
survival with a fresh standing body, holding only stack in its main hand; its persistent
body, items, look, secondary-use state and action timers are restored afterwards.
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.stack: Option<ItemStack>The main-hand stack, or None for an empty hand.
eye: [f64; 3]Eye position in world coordinates, using the standing eye height (1.62).
yaw: f32Vanilla yaw in degrees.
pitch: f32Vanilla pitch in degrees.
secondary_use: boolSecondary use, as when holding sneak; this does not change the standing eye height.
Implementations§
Trait Implementations§
§impl Clone for PlayerActionSetup
impl Clone for PlayerActionSetup
§fn clone(&self) -> PlayerActionSetup
fn clone(&self) -> PlayerActionSetup
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 PlayerActionSetup
impl Debug for PlayerActionSetup
§impl PartialEq for PlayerActionSetup
impl PartialEq for PlayerActionSetup
impl StructuralPartialEq for PlayerActionSetup
Auto Trait Implementations§
impl Freeze for PlayerActionSetup
impl RefUnwindSafe for PlayerActionSetup
impl Send for PlayerActionSetup
impl Sync for PlayerActionSetup
impl Unpin for PlayerActionSetup
impl UnsafeUnpin for PlayerActionSetup
impl UnwindSafe for PlayerActionSetup
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