aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2023-05-04 20:38:10 +0000
committermat <github@matdoes.dev>2023-05-04 20:38:10 +0000
commitc7a923ccc8ae825deca62ac2cc8c80c01484d5b6 (patch)
tree787c6eb579d0b126f0e9dfa161bdea758fe9aa0a /azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs
parentff6d43458cef8ac6a23e6e8accd4b71c2a04aef6 (diff)
parent634cb8d72c6608512aedba19e5cd669104bc35ea (diff)
downloadazalea-drasl-c7a923ccc8ae825deca62ac2cc8c80c01484d5b6.tar.xz
merge main
Diffstat (limited to 'azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs')
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs19
1 files changed, 10 insertions, 9 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs b/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs
index 3dbac1b5..8c24bdbe 100755
--- a/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs
@@ -1,7 +1,8 @@
use azalea_buf::{
BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable,
};
-use azalea_core::{ResourceLocation, Slot};
+use azalea_core::ResourceLocation;
+use azalea_inventory::ItemSlot;
use azalea_protocol_macros::ClientboundGamePacket;
use azalea_registry::RecipeSerializer;
@@ -26,7 +27,7 @@ pub struct ShapelessRecipe {
pub group: String,
pub category: CraftingBookCategory,
pub ingredients: Vec<Ingredient>,
- pub result: Slot,
+ pub result: ItemSlot,
}
#[derive(Clone, Debug)]
pub struct ShapedRecipe {
@@ -35,7 +36,7 @@ pub struct ShapedRecipe {
pub group: String,
pub category: CraftingBookCategory,
pub ingredients: Vec<Ingredient>,
- pub result: Slot,
+ pub result: ItemSlot,
pub show_notification: bool,
}
@@ -71,7 +72,7 @@ impl McBufReadable for ShapedRecipe {
for _ in 0..width * height {
ingredients.push(Ingredient::read_from(buf)?);
}
- let result = Slot::read_from(buf)?;
+ let result = ItemSlot::read_from(buf)?;
let show_notification = bool::read_from(buf)?;
Ok(ShapedRecipe {
@@ -91,7 +92,7 @@ pub struct CookingRecipe {
pub group: String,
pub category: CraftingBookCategory,
pub ingredient: Ingredient,
- pub result: Slot,
+ pub result: ItemSlot,
pub experience: f32,
#[var]
pub cooking_time: u32,
@@ -100,13 +101,13 @@ pub struct CookingRecipe {
pub struct StoneCutterRecipe {
pub group: String,
pub ingredient: Ingredient,
- pub result: Slot,
+ pub result: ItemSlot,
}
#[derive(Clone, Debug, McBuf)]
pub struct SmithingRecipe {
pub base: Ingredient,
pub addition: Ingredient,
- pub result: Slot,
+ pub result: ItemSlot,
}
#[derive(Clone, Debug, McBuf)]
@@ -119,7 +120,7 @@ pub struct SmithingTransformRecipe {
pub template: Ingredient,
pub base: Ingredient,
pub addition: Ingredient,
- pub result: Slot,
+ pub result: ItemSlot,
}
#[derive(Clone, Debug, McBuf)]
@@ -158,7 +159,7 @@ pub enum RecipeData {
#[derive(Clone, Debug, McBuf)]
pub struct Ingredient {
- pub allowed: Vec<Slot>,
+ pub allowed: Vec<ItemSlot>,
}
impl McBufWritable for Recipe {