[][src]Struct ozelot::clientbound::JoinGame

pub struct JoinGame { /* fields omitted */ }

Methods

impl JoinGame[src]

pub fn deserialize<R: Read>(r: &mut R) -> Result<ClientboundPacket>[src]

Deserializes a Read type into a packet. You usually won't need to use this.

pub fn to_u8(&self) -> Result<Vec<u8>>[src]

Serializes the packet into Vec. You usually won't need to use this.

pub fn new(
    entity_id: i32,
    gamemode: u8,
    dimension: i32,
    hashed_seed: i64,
    max_players: u8,
    level_type: String,
    view_distance: i32,
    reduced_debug: bool,
    enable_respawn_screen: bool
) -> ClientboundPacket
[src]

pub fn get_entity_id(&self) -> &i32[src]

Get the player's entity ID

pub fn get_gamemode(&self) -> &u8[src]

Get the player's gamemode

pub fn get_dimension(&self) -> &i32[src]

Get the dimension the player is in. Not the specific world (in case of servers with multiworld), but the kind of world

pub fn get_hashed_seed(&self) -> &i64[src]

Get the first 8 bytes of the SHA-256 hash of the world's seed

pub fn get_max_players(&self) -> &u8[src]

get the max_players field (UNDOCUMENTED)

pub fn get_level_type(&self) -> &String[src]

Get the level type of the world the player joined in

pub fn get_view_distance(&self) -> &i32[src]

Get the render distance in chunks

pub fn get_reduced_debug(&self) -> &bool[src]

Get whether to show reduced debug info

pub fn get_enable_respawn_screen(&self) -> &bool[src]

Get whether or not the respawn screen should be shown. Will be false if the doImmediateRespawn gamerule is true.

Trait Implementations

impl Clone for JoinGame[src]

impl Debug for JoinGame[src]

impl PartialEq<JoinGame> for JoinGame[src]

impl StructuralPartialEq for JoinGame[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.