[−][src]Trait ozelot::Packet
Trait for the two enums ClientboundPacket and ServerboundPacket
Required methods
fn deserialize<R: Read>(r: &mut R, state: &ClientState) -> Result<Self>
Deserializes a Read type into a packet. You usually won't need to use this.
fn get_packet_name(&self) -> &str
Returns the packet's name
fn get_clientstate(&self) -> ClientState
Returns the connection state in which the packet can be sent
fn get_id(&self) -> i32
Returns the ID of the packet
fn to_u8(&self) -> Result<Vec<u8>>
Serializes the packet into Vec