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