azalea_protocol/packets/game/
c_update_recipes.rs

1use 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(Clone, Debug, AzBuf, PartialEq, ClientboundGamePacket)]
11pub struct ClientboundUpdateRecipes {
12    pub item_sets: HashMap<Identifier, RecipePropertySet>,
13    pub stonecutter_recipes: Vec<SingleInputEntry>,
14}
15
16#[derive(Clone, Debug, PartialEq, AzBuf)]
17pub struct SingleInputEntry {
18    pub input: Ingredient,
19    pub recipe: SelectableRecipe,
20}
21#[derive(Clone, Debug, PartialEq, AzBuf)]
22pub struct SelectableRecipe {
23    pub option_display: SlotDisplayData,
24}
25
26#[derive(Clone, Debug, PartialEq, AzBuf)]
27pub struct RecipePropertySet {
28    pub items: Vec<ItemKind>,
29}