#[non_exhaustive]pub enum GameVersion {
V1_8_9,
V1_16_5,
}Expand description
A protocol version the client supports, chosen at run time.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl GameVersion
impl GameVersion
Sourcepub const ALL: [GameVersion; 2]
pub const ALL: [GameVersion; 2]
Every supported version.
Sourcepub fn eye_height(self) -> f64
pub fn eye_height(self) -> f64
Eye height above the feet while standing: 1.62F widened to double (every supported
version).
Sourcepub fn sneak_eye_height(self) -> f64
pub fn sneak_eye_height(self) -> f64
Eye height while sneaking: 1.54 in 1.8 (getEyeHeight − 0.08), 1.27 in 1.16 (the
crouching pose).
Trait Implementations§
Source§impl Clone for GameVersion
impl Clone for GameVersion
impl Copy for GameVersion
Source§impl Debug for GameVersion
impl Debug for GameVersion
Source§impl Display for GameVersion
impl Display for GameVersion
impl Eq for GameVersion
Source§impl FromStr for GameVersion
impl FromStr for GameVersion
Source§impl Hash for GameVersion
impl Hash for GameVersion
Source§impl PartialEq for GameVersion
impl PartialEq for GameVersion
impl StructuralPartialEq for GameVersion
Auto Trait Implementations§
impl Freeze for GameVersion
impl RefUnwindSafe for GameVersion
impl Send for GameVersion
impl Sync for GameVersion
impl Unpin for GameVersion
impl UnsafeUnpin for GameVersion
impl UnwindSafe for GameVersion
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