aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/c_update_recipes.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-12-19 02:31:08 +0000
committermat <git@matdoes.dev>2024-12-19 02:52:41 +0000
commite268c4929177e540baa9d2bb29bc171f49cc7a25 (patch)
tree10146e529088ab823452a5971c0a37a8886b2a68 /azalea-protocol/src/packets/game/c_update_recipes.rs
parent1f06a1540f46d8087907566d7c6c1ab397c517ec (diff)
downloadazalea-drasl-e268c4929177e540baa9d2bb29bc171f49cc7a25.tar.xz
fix incorrect packets
Diffstat (limited to 'azalea-protocol/src/packets/game/c_update_recipes.rs')
-rwxr-xr-xazalea-protocol/src/packets/game/c_update_recipes.rs50
1 files changed, 2 insertions, 48 deletions
diff --git a/azalea-protocol/src/packets/game/c_update_recipes.rs b/azalea-protocol/src/packets/game/c_update_recipes.rs
index 38c4f37b..e151ae51 100755
--- a/azalea-protocol/src/packets/game/c_update_recipes.rs
+++ b/azalea-protocol/src/packets/game/c_update_recipes.rs
@@ -2,9 +2,9 @@ use std::collections::HashMap;
use azalea_buf::AzBuf;
use azalea_core::resource_location::ResourceLocation;
-use azalea_inventory::ItemStack;
use azalea_protocol_macros::ClientboundGamePacket;
-use azalea_registry::HolderSet;
+
+use crate::common::recipe::{Ingredient, SlotDisplayData};
#[derive(Clone, Debug, PartialEq, AzBuf, ClientboundGamePacket)]
pub struct ClientboundUpdateRecipes {
@@ -22,53 +22,7 @@ pub struct SelectableRecipe {
pub option_display: SlotDisplayData,
}
-/// [`azalea_registry::SlotDisplay`]
-#[derive(Clone, Debug, PartialEq, AzBuf)]
-pub enum SlotDisplayData {
- Empty,
- AnyFuel,
- Item(ItemStackDisplay),
- ItemStack(ItemStackSlotDisplay),
- Tag(ResourceLocation),
- SmithingTrim(Box<SmithingTrimDemoSlotDisplay>),
- WithRemainder(Box<WithRemainderSlotDisplay>),
- Composite(CompositeSlotDisplay),
-}
-
-#[derive(Clone, Debug, PartialEq, AzBuf)]
-pub struct ItemStackDisplay {
- pub item: azalea_registry::Item,
-}
-#[derive(Clone, Debug, PartialEq, AzBuf)]
-pub struct ItemStackSlotDisplay {
- pub stack: ItemStack,
-}
-#[derive(Clone, Debug, PartialEq, AzBuf)]
-pub struct TagSlotDisplay {
- pub tag: azalea_registry::Item,
-}
-#[derive(Clone, Debug, PartialEq, AzBuf)]
-pub struct SmithingTrimDemoSlotDisplay {
- pub base: SlotDisplayData,
- pub material: SlotDisplayData,
- pub pattern: SlotDisplayData,
-}
-#[derive(Clone, Debug, PartialEq, AzBuf)]
-pub struct WithRemainderSlotDisplay {
- pub input: SlotDisplayData,
- pub remainder: SlotDisplayData,
-}
-#[derive(Clone, Debug, PartialEq, AzBuf)]
-pub struct CompositeSlotDisplay {
- pub contents: Vec<SlotDisplayData>,
-}
-
#[derive(Clone, Debug, PartialEq, AzBuf)]
pub struct RecipePropertySet {
pub items: Vec<azalea_registry::Item>,
}
-
-#[derive(Clone, Debug, PartialEq, AzBuf)]
-pub struct Ingredient {
- pub allowed: HolderSet<azalea_registry::Item, ResourceLocation>,
-}