diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2022-07-30 22:57:02 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-30 22:57:02 +0000 |
| commit | bc71c74bef5f82de7224f97a65614251f3ed7cb1 (patch) | |
| tree | 254a58c1ac77b047df0b86d75d3c6d9dd52c14fc /azalea-protocol/src/packets/mod.rs | |
| parent | 060d2f1592b98bca64b2ee15e103aa14db816227 (diff) | |
| parent | 9ef1e8d653acd7e8e026cbde9c0320cedb8cf1d3 (diff) | |
| download | azalea-drasl-bc71c74bef5f82de7224f97a65614251f3ed7cb1.tar.xz | |
Merge pull request #13 from mat-1/split-clientbound-serverbound
Split clientbound and serverbound packets
Diffstat (limited to 'azalea-protocol/src/packets/mod.rs')
| -rw-r--r-- | azalea-protocol/src/packets/mod.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index fbccc087..228d7c74 100644 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -3,7 +3,6 @@ pub mod handshake; pub mod login; pub mod status; -use crate::connect::PacketFlow; use azalea_buf::{McBufWritable, Readable, Writable}; use std::io::{Read, Write}; @@ -29,14 +28,6 @@ impl ConnectionProtocol { } } -#[derive(Clone, Debug)] -pub enum Packet { - Game(Box<game::GamePacket>), - Handshake(Box<handshake::HandshakePacket>), - Login(Box<login::LoginPacket>), - Status(Box<status::StatusPacket>), -} - /// An enum of packets for a certain protocol pub trait ProtocolPacket where @@ -45,7 +36,7 @@ where fn id(&self) -> u32; /// Read a packet by its id, ConnectionProtocol, and flow - fn read(id: u32, flow: &PacketFlow, buf: &mut impl Read) -> Result<Self, String>; + fn read(id: u32, buf: &mut impl Read) -> Result<Self, String>; fn write(&self, buf: &mut impl Write) -> Result<(), std::io::Error>; } |
