#[non_exhaustive]pub struct DigFactors {
pub on_ground: bool,
pub in_water: bool,
pub aqua_affinity: bool,
pub haste: u8,
pub fatigue: u8,
}Expand description
Mining speed modifiers of the player.
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.on_ground: boolOn ground.
in_water: boolEyes in water.
aqua_affinity: boolAqua affinity on the helmet.
haste: u8Haste level (amplifier + 1), 0 = none.
fatigue: u8Mining fatigue level (amplifier + 1), 0 = none.
Implementations§
Source§impl DigFactors
impl DigFactors
Sourcepub const fn with_on_ground(self, on: bool) -> Self
pub const fn with_on_ground(self, on: bool) -> Self
On ground.
Sourcepub const fn with_in_water(self, on: bool) -> Self
pub const fn with_in_water(self, on: bool) -> Self
Eyes in water.
Sourcepub const fn with_aqua_affinity(self, on: bool) -> Self
pub const fn with_aqua_affinity(self, on: bool) -> Self
Aqua affinity on the helmet.
Sourcepub const fn with_haste(self, level: u8) -> Self
pub const fn with_haste(self, level: u8) -> Self
Haste level (amplifier + 1), 0 = none.
Sourcepub const fn with_fatigue(self, level: u8) -> Self
pub const fn with_fatigue(self, level: u8) -> Self
Mining fatigue level (amplifier + 1), 0 = none.
Trait Implementations§
Source§impl Clone for DigFactors
impl Clone for DigFactors
impl Copy for DigFactors
Source§impl Debug for DigFactors
impl Debug for DigFactors
Source§impl Default for DigFactors
impl Default for DigFactors
impl Eq for DigFactors
Source§impl PartialEq for DigFactors
impl PartialEq for DigFactors
impl StructuralPartialEq for DigFactors
Auto Trait Implementations§
impl Forget for DigFactors
impl Freeze for DigFactors
impl RefUnwindSafe for DigFactors
impl Send for DigFactors
impl Sync for DigFactors
impl Unpin for DigFactors
impl UnsafeUnpin for DigFactors
impl UnwindSafe for DigFactors
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