mirror of
https://github.com/mat-1/azalea.git
synced 2024-09-20 07:02:31 +00:00
start adding update recipes packet
This commit is contained in:
parent
d6f0449344
commit
e4e8cae0e3
4 changed files with 20 additions and 9 deletions
|
@ -1,11 +1,8 @@
|
||||||
use std::hash::Hash;
|
|
||||||
|
|
||||||
use async_trait::async_trait;
|
|
||||||
use tokio::io::AsyncRead;
|
|
||||||
|
|
||||||
use crate::mc_buf::{McBufReadable, Readable};
|
|
||||||
|
|
||||||
use super::GamePacket;
|
use super::GamePacket;
|
||||||
|
use crate::mc_buf::{McBufReadable, Readable};
|
||||||
|
use async_trait::async_trait;
|
||||||
|
use std::hash::Hash;
|
||||||
|
use tokio::io::AsyncRead;
|
||||||
|
|
||||||
#[derive(Hash, Clone, Debug)]
|
#[derive(Hash, Clone, Debug)]
|
||||||
pub struct ClientboundDeclareCommandsPacket {
|
pub struct ClientboundDeclareCommandsPacket {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
use azalea_chat::component::Component;
|
use azalea_chat::component::Component;
|
||||||
use azalea_core::resource_location::ResourceLocation;
|
|
||||||
use packet_macros::GamePacket;
|
use packet_macros::GamePacket;
|
||||||
use serde::Deserialize;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, GamePacket)]
|
#[derive(Clone, Debug, GamePacket)]
|
||||||
pub struct ClientboundDisconnectPacket {
|
pub struct ClientboundDisconnectPacket {
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
|
@ -5,6 +5,7 @@ pub mod clientbound_disconnect_packet;
|
||||||
pub mod clientbound_login_packet;
|
pub mod clientbound_login_packet;
|
||||||
pub mod clientbound_player_abilities_packet;
|
pub mod clientbound_player_abilities_packet;
|
||||||
pub mod clientbound_set_carried_item_packet;
|
pub mod clientbound_set_carried_item_packet;
|
||||||
|
pub mod clientbound_update_recipes_packet;
|
||||||
pub mod clientbound_update_tags_packet;
|
pub mod clientbound_update_tags_packet;
|
||||||
pub mod clientbound_update_view_distance_packet;
|
pub mod clientbound_update_view_distance_packet;
|
||||||
|
|
||||||
|
@ -22,6 +23,7 @@ declare_state_packets!(
|
||||||
0x32: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket,
|
0x32: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket,
|
||||||
0x48: clientbound_set_carried_item_packet::ClientboundSetCarriedItemPacket,
|
0x48: clientbound_set_carried_item_packet::ClientboundSetCarriedItemPacket,
|
||||||
0x4a: clientbound_update_view_distance_packet::ClientboundUpdateViewDistancePacket,
|
0x4a: clientbound_update_view_distance_packet::ClientboundUpdateViewDistancePacket,
|
||||||
|
0x66: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket,
|
||||||
0x67: clientbound_update_tags_packet::ClientboundUpdateTagsPacket
|
0x67: clientbound_update_tags_packet::ClientboundUpdateTagsPacket
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue