azalea_protocol/packets/game/
c_update_recipes.rs1use std::collections::HashMap;
2
3use azalea_buf::AzBuf;
4use azalea_registry::identifier::Identifier;
5use azalea_protocol_macros::ClientboundGamePacket;
6use azalea_registry::builtin::ItemKind;
7
8use crate::common::recipe::{Ingredient, SlotDisplayData};
9
10#[derive(AzBuf, ClientboundGamePacket, Clone, Debug, PartialEq)]
11pub struct ClientboundUpdateRecipes {
12 pub item_sets: HashMap<Identifier, RecipePropertySet>,
13 pub stonecutter_recipes: Vec<SingleInputEntry>,
14}
15
16#[derive(AzBuf, Clone, Debug, PartialEq)]
17pub struct SingleInputEntry {
18 pub input: Ingredient,
19 pub recipe: SelectableRecipe,
20}
21#[derive(AzBuf, Clone, Debug, PartialEq)]
22pub struct SelectableRecipe {
23 pub option_display: SlotDisplayData,
24}
25
26#[derive(AzBuf, Clone, Debug, PartialEq)]
27pub struct RecipePropertySet {
28 pub items: Vec<ItemKind>,
29}