azalea_protocol/packets/game/
c_recipe_book_add.rs1use azalea_buf::AzBuf;
2use azalea_protocol_macros::ClientboundGamePacket;
3use azalea_registry::builtin::RecipeBookCategory;
4
5use crate::common::recipe::{Ingredient, RecipeDisplayData};
6
7#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundGamePacket)]
8pub struct ClientboundRecipeBookAdd {
9 pub entries: Vec<Entry>,
10 pub replace: bool,
11}
12
13#[derive(Clone, Debug, AzBuf, PartialEq)]
14pub struct Entry {
15 pub contents: RecipeDisplayEntry,
16 pub flags: u8,
17}
18
19#[derive(Clone, Debug, AzBuf, PartialEq)]
20pub struct RecipeDisplayEntry {
21 #[var]
22 pub id: u32,
23 pub display: RecipeDisplayData,
24 #[var]
26 pub group: u32,
27 pub category: RecipeBookCategory,
28 pub crafting_requirements: Option<Vec<Ingredient>>,
29}