aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src/packets')
-rwxr-xr-xazalea-protocol/src/packets/login/clientbound_hello_packet.rs7
-rwxr-xr-xazalea-protocol/src/packets/login/mod.rs6
-rw-r--r--azalea-protocol/src/packets/login/serverbound_key_packet.rs6
3 files changed, 9 insertions, 10 deletions
diff --git a/azalea-protocol/src/packets/login/clientbound_hello_packet.rs b/azalea-protocol/src/packets/login/clientbound_hello_packet.rs
index 9d0cec39..d36f1335 100755
--- a/azalea-protocol/src/packets/login/clientbound_hello_packet.rs
+++ b/azalea-protocol/src/packets/login/clientbound_hello_packet.rs
@@ -1,14 +1,13 @@
use std::hash::Hash;
-use crate::mc_buf::Readable;
-
use super::LoginPacket;
+use crate::mc_buf::{ByteArray, Readable};
#[derive(Hash, Clone, Debug)]
pub struct ClientboundHelloPacket {
pub server_id: String,
- pub public_key: Vec<u8>,
- pub nonce: Vec<u8>,
+ pub public_key: ByteArray,
+ pub nonce: ByteArray,
}
impl ClientboundHelloPacket {
diff --git a/azalea-protocol/src/packets/login/mod.rs b/azalea-protocol/src/packets/login/mod.rs
index 93c1200f..b160a28c 100755
--- a/azalea-protocol/src/packets/login/mod.rs
+++ b/azalea-protocol/src/packets/login/mod.rs
@@ -15,9 +15,9 @@ declare_state_packets!(
0x01: serverbound_key_packet::ServerboundKeyPacket,
},
Clientbound => {
- // 0x00: clientbound_login_disconnect_packet::ClientboundLoginDisconnectPacket,
- // for some reason this is used instead of 0x00??
- 0x1a: clientbound_login_disconnect_packet::ClientboundLoginDisconnectPacket,
+ 0x00: clientbound_login_disconnect_packet::ClientboundLoginDisconnectPacket,
+ // sometimes this is used for some reason?
+ // 0x1a: clientbound_login_disconnect_packet::ClientboundLoginDisconnectPacket,
0x01: clientbound_hello_packet::ClientboundHelloPacket,
0x02: clientbound_game_profile_packet::ClientboundGameProfilePacket,
diff --git a/azalea-protocol/src/packets/login/serverbound_key_packet.rs b/azalea-protocol/src/packets/login/serverbound_key_packet.rs
index f402d357..3750331f 100644
--- a/azalea-protocol/src/packets/login/serverbound_key_packet.rs
+++ b/azalea-protocol/src/packets/login/serverbound_key_packet.rs
@@ -1,10 +1,10 @@
use super::LoginPacket;
-use crate::mc_buf::Writable;
+use crate::mc_buf::{ByteArray, Writable};
use packet_macros::LoginPacket;
use std::hash::Hash;
#[derive(Hash, Clone, Debug, LoginPacket)]
pub struct ServerboundKeyPacket {
- pub shared_secret: Vec<u8>,
- pub nonce: Vec<u8>,
+ pub shared_secret: ByteArray,
+ pub nonce: ByteArray,
}