aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-12-18 10:11:53 -0600
committermat <github@matdoes.dev>2021-12-18 10:11:53 -0600
commit428d0ee0e643676e47683c7d314cefebd03bf3f1 (patch)
treee866351a18886ed75017ec7fe09e9b3499534c75 /azalea-protocol
parent8e3ba097b48543a85f2cf487d5db90add3f28bac (diff)
downloadazalea-drasl-428d0ee0e643676e47683c7d314cefebd03bf3f1.tar.xz
mmm registries
Diffstat (limited to 'azalea-protocol')
-rw-r--r--azalea-protocol/src/packets/game/clientbound_login_packet.rs17
-rw-r--r--azalea-protocol/src/packets/game/mod.rs5
2 files changed, 13 insertions, 9 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_login_packet.rs b/azalea-protocol/src/packets/game/clientbound_login_packet.rs
index fc701d9d..0e23460e 100644
--- a/azalea-protocol/src/packets/game/clientbound_login_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_login_packet.rs
@@ -27,7 +27,7 @@ pub struct ClientboundLoginPacket {
pub game_type: GameType,
pub previous_game_type: Option<GameType>,
pub levels: Vec<ResourceLocation>,
- pub registry_holder: azalea_core::registry::RegistryAccess,
+ // pub registry_holder: azalea_core::registry::RegistryAccess,
}
impl ClientboundLoginPacket {
@@ -37,7 +37,7 @@ impl ClientboundLoginPacket {
pub fn write(&self, buf: &mut Vec<u8>) {
buf.write_int(self.player_id);
- buf.write_bool(self.hardcore);
+ // buf.write_bool(self.hardcore);
// buf.write_byte(self.game_type.
}
@@ -47,11 +47,12 @@ impl ClientboundLoginPacket {
let transaction_id = buf.read_varint().await? as u32;
let identifier = ResourceLocation::new(&buf.read_utf().await?)?;
let data = buf.read_bytes(1048576).await?;
- Ok(ClientboundLoginPacket {
- transaction_id,
- identifier,
- data,
- }
- .get())
+ panic!("not implemented");
+ // Ok(ClientboundLoginPacket {
+ // transaction_id,
+ // identifier,
+ // data,
+ // }
+ // .get())
}
}
diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs
index 73f66c33..932435d9 100644
--- a/azalea-protocol/src/packets/game/mod.rs
+++ b/azalea-protocol/src/packets/game/mod.rs
@@ -8,7 +8,10 @@ use tokio::io::BufReader;
#[derive(Clone, Debug)]
pub enum GamePacket
where
- Self: Sized, {}
+ Self: Sized,
+{
+ ClientboundLoginPacket(clientbound_login_packet::ClientboundLoginPacket),
+}
#[async_trait]
impl ProtocolPacket for GamePacket {