Smithing recipe type

This commit is contained in:
ice_iix 2020-06-27 17:14:47 -07:00
parent 08e08d1bd9
commit 34d3202541
1 changed files with 11 additions and 0 deletions

View File

@ -2645,6 +2645,12 @@ pub enum RecipeData {
ingredient: RecipeIngredient,
result: Option<item::Stack>,
},
Smithing {
base: RecipeIngredient,
addition: RecipeIngredient,
result: Option<item::Stack>,
},
}
impl Default for RecipeData {
@ -2759,6 +2765,11 @@ impl Serializable for Recipe {
ingredient: Serializable::read_from(buf)?,
result: Serializable::read_from(buf)?,
},
"minecraft:smithing" => RecipeData::Smithing {
base: Serializable::read_from(buf)?,
addition: Serializable::read_from(buf)?,
result: Serializable::read_from(buf)?,
},
_ => panic!("unrecognized recipe type: {}", ty),
};