aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/c_update_recipes.rs
blob: eee89d288656beecde3959078cf5ef35db626add (plain)
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 std::collections::HashMap;

use azalea_buf::AzBuf;
use azalea_registry::identifier::Identifier;
use azalea_protocol_macros::ClientboundGamePacket;
use azalea_registry::builtin::ItemKind;

use crate::common::recipe::{Ingredient, SlotDisplayData};

#[derive(AzBuf, ClientboundGamePacket, Clone, Debug, PartialEq)]
pub struct ClientboundUpdateRecipes {
    pub item_sets: HashMap<Identifier, RecipePropertySet>,
    pub stonecutter_recipes: Vec<SingleInputEntry>,
}

#[derive(AzBuf, Clone, Debug, PartialEq)]
pub struct SingleInputEntry {
    pub input: Ingredient,
    pub recipe: SelectableRecipe,
}
#[derive(AzBuf, Clone, Debug, PartialEq)]
pub struct SelectableRecipe {
    pub option_display: SlotDisplayData,
}

#[derive(AzBuf, Clone, Debug, PartialEq)]
pub struct RecipePropertySet {
    pub items: Vec<ItemKind>,
}