From 34d32025411cbfeeca66edfffaae9d627b3184e9 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 27 Jun 2020 17:14:47 -0700 Subject: [PATCH] Smithing recipe type --- protocol/src/protocol/packet.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/protocol/src/protocol/packet.rs b/protocol/src/protocol/packet.rs index 527bfed..d56b334 100644 --- a/protocol/src/protocol/packet.rs +++ b/protocol/src/protocol/packet.rs @@ -2645,6 +2645,12 @@ pub enum RecipeData { ingredient: RecipeIngredient, result: Option, }, + Smithing { + base: RecipeIngredient, + addition: RecipeIngredient, + result: Option, + }, + } 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), };