diff options
| author | mat <git@matdoes.dev> | 2024-12-19 02:31:08 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-12-19 02:52:41 +0000 |
| commit | e268c4929177e540baa9d2bb29bc171f49cc7a25 (patch) | |
| tree | 10146e529088ab823452a5971c0a37a8886b2a68 /azalea-protocol/src/packets/game/c_update_recipes.rs | |
| parent | 1f06a1540f46d8087907566d7c6c1ab397c517ec (diff) | |
| download | azalea-drasl-e268c4929177e540baa9d2bb29bc171f49cc7a25.tar.xz | |
fix incorrect packets
Diffstat (limited to 'azalea-protocol/src/packets/game/c_update_recipes.rs')
| -rwxr-xr-x | azalea-protocol/src/packets/game/c_update_recipes.rs | 50 |
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>, -} |
