diff options
| author | mat <github@matdoes.dev> | 2021-12-09 22:10:45 +0000 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2021-12-09 22:10:45 +0000 |
| commit | 966471f740ea7cb19e7106000a9f3cf9d306fd32 (patch) | |
| tree | 7bec45bf72900ad6a1752ec9f7c172f385736880 /minecraft-protocol/src/packets/client_intention_packet.rs | |
| parent | ecee5e96ca2f7d00dd14f44ff0c1facd01550b65 (diff) | |
| download | azalea-drasl-966471f740ea7cb19e7106000a9f3cf9d306fd32.tar.xz | |
split mstuff
Diffstat (limited to 'minecraft-protocol/src/packets/client_intention_packet.rs')
| -rw-r--r-- | minecraft-protocol/src/packets/client_intention_packet.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/minecraft-protocol/src/packets/client_intention_packet.rs b/minecraft-protocol/src/packets/client_intention_packet.rs deleted file mode 100644 index 424c645f..00000000 --- a/minecraft-protocol/src/packets/client_intention_packet.rs +++ /dev/null @@ -1,31 +0,0 @@ -use std::hash::Hash; - -use crate::mc_buf; - -use super::{ConnectionProtocol, Packet}; - -#[derive(Hash)] -pub struct ClientIntentionPacket<'a> { - pub protocol_version: u32, - pub hostname: &'a String, - pub port: u16, - /// 1 for status, 2 for login - pub intention: ConnectionProtocol, -} - -// implement "Packet" for "ClientIntentionPacket" -impl<'a> Packet for ClientIntentionPacket<'a> { - fn get_id(&self) -> u32 { - 0x00 - } - - // implement "from_reader" for "ClientIntentionPacket" - fn write(&self, buf: &mut Vec<u8>) { - mc_buf::write_varint(buf, self.protocol_version as i32); - mc_buf::write_utf(buf, &self.hostname); - mc_buf::write_short(buf, self.port); - mc_buf::write_varint(buf, self.intention.clone() as i32); - } - - fn parse<T: tokio::io::AsyncRead + std::marker::Unpin>(&self, buf: T) -> () {} -} |
