diff options
| author | mat <github@matdoes.dev> | 2022-04-24 23:02:21 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-04-24 23:02:21 -0500 |
| commit | e4e8cae0e3c5e8048a409c56be6faf8545e2283d (patch) | |
| tree | 04956beca8f08a24949c6d941a6488b9023e1581 | |
| parent | d6f0449344b22fab40bf5ed66159ae286f2e0826 (diff) | |
| download | azalea-drasl-e4e8cae0e3c5e8048a409c56be6faf8545e2283d.tar.xz | |
start adding update recipes packet
4 files changed, 19 insertions, 8 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs b/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs index 1403630d..dc914f73 100755 --- a/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_declare_commands_packet.rs @@ -1,12 +1,9 @@ -use std::hash::Hash; - +use super::GamePacket; +use crate::mc_buf::{McBufReadable, Readable}; use async_trait::async_trait; +use std::hash::Hash; use tokio::io::AsyncRead; -use crate::mc_buf::{McBufReadable, Readable}; - -use super::GamePacket; - #[derive(Hash, Clone, Debug)] pub struct ClientboundDeclareCommandsPacket { pub entries: Vec<BrigadierNodeStub>, diff --git a/azalea-protocol/src/packets/game/clientbound_disconnect_packet.rs b/azalea-protocol/src/packets/game/clientbound_disconnect_packet.rs index 74f5f72e..2e72b19b 100644 --- a/azalea-protocol/src/packets/game/clientbound_disconnect_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_disconnect_packet.rs @@ -1,7 +1,5 @@ use azalea_chat::component::Component; -use azalea_core::resource_location::ResourceLocation; use packet_macros::GamePacket; -use serde::Deserialize; #[derive(Clone, Debug, GamePacket)] pub struct ClientboundDisconnectPacket { diff --git a/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs b/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs new file mode 100644 index 00000000..8f9deae8 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs @@ -0,0 +1,14 @@ +use azalea_chat::component::Component; +use azalea_core::resource_location::ResourceLocation; +use packet_macros::GamePacket; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundUpdateRecipesPacket { + pub recipes: Vec<Recipe>, +} + +struct Recipe { + type_: ResourceLocation, + identifier: ResourceLocation, + // data +} diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index dde3f753..986a7010 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -5,6 +5,7 @@ pub mod clientbound_disconnect_packet; pub mod clientbound_login_packet; pub mod clientbound_player_abilities_packet; pub mod clientbound_set_carried_item_packet; +pub mod clientbound_update_recipes_packet; pub mod clientbound_update_tags_packet; pub mod clientbound_update_view_distance_packet; @@ -22,6 +23,7 @@ declare_state_packets!( 0x32: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket, 0x48: clientbound_set_carried_item_packet::ClientboundSetCarriedItemPacket, 0x4a: clientbound_update_view_distance_packet::ClientboundUpdateViewDistancePacket, + 0x66: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket, 0x67: clientbound_update_tags_packet::ClientboundUpdateTagsPacket } ); |
