diff options
| author | mat <github@matdoes.dev> | 2022-01-01 23:55:19 -0600 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-01-01 23:55:19 -0600 |
| commit | a1afbb6031527c1db5831fc8e916bc0ecce633b4 (patch) | |
| tree | 56fbccf52645cc2eefd231506ffe8ed71018dc01 /azalea-protocol/src/packets/mod.rs | |
| parent | e81b85dd5bdd6d42ee84f24ed4a142f6141f170e (diff) | |
| download | azalea-drasl-a1afbb6031527c1db5831fc8e916bc0ecce633b4.tar.xz | |
start adding packet macros
Diffstat (limited to 'azalea-protocol/src/packets/mod.rs')
| -rw-r--r-- | azalea-protocol/src/packets/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index e065b65c..0f1cd2f0 100644 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -3,13 +3,13 @@ pub mod handshake; pub mod login; pub mod status; -use async_trait::async_trait; - use crate::connect::PacketFlow; +use async_trait::async_trait; +use num_derive::FromPrimitive; pub const PROTOCOL_VERSION: u32 = 757; -#[derive(Debug, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Clone, PartialEq, Eq, Hash, FromPrimitive)] pub enum ConnectionProtocol { Handshake = -1, Game = 0, @@ -42,5 +42,5 @@ where where Self: Sized; - fn write(&self, buf: &mut Vec<u8>); + fn write(&self, buf: &mut Vec<u8>) -> Result<(), std::io::Error>; } |
