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

use azalea_buf::AzBuf;
use azalea_core::resource_location::ResourceLocation;
use azalea_protocol_macros::ClientboundGamePacket;

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

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

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

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