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/game/mod.rs | |
| parent | e81b85dd5bdd6d42ee84f24ed4a142f6141f170e (diff) | |
| download | azalea-drasl-a1afbb6031527c1db5831fc8e916bc0ecce633b4.tar.xz | |
start adding packet macros
Diffstat (limited to 'azalea-protocol/src/packets/game/mod.rs')
| -rw-r--r-- | azalea-protocol/src/packets/game/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index ab5ca7e8..43b3ca3d 100644 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -30,7 +30,9 @@ impl ProtocolPacket for GamePacket { } } - fn write(&self, _buf: &mut Vec<u8>) {} + fn write(&self, buf: &mut Vec<u8>) -> Result<(), std::io::Error> { + Ok(()) + } /// Read a packet by its id, ConnectionProtocol, and flow async fn read<T: tokio::io::AsyncRead + std::marker::Unpin + std::marker::Send>( @@ -48,7 +50,8 @@ impl ProtocolPacket for GamePacket { 0x4a => clientbound_update_view_distance_packet::ClientboundUpdateViewDistancePacket ::read(buf) .await?, - _ => return Err(format!("Unknown ServerToClient game packet id: {}", id)), + // _ => return Err(format!("Unknown ServerToClient game packet id: {}", id)), + _ => panic!("Unknown ServerToClient game packet id: {}", id), }, PacketFlow::ClientToServer => match id { // 0x00 => serverbound_hello_packet::ServerboundHelloPacket::read(buf).await?, |
