diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2025-12-12 00:56:02 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-12 00:56:02 -0600 |
| commit | f9c25665c203d6377ace62f1e95381d037d8fd9e (patch) | |
| tree | 8b4131d20fe661d3cc1175ec27f801fe61df41ea /azalea-protocol/src/common/recipe.rs | |
| parent | 82ad975242292d5875780b4398b62637674bf50a (diff) | |
| download | azalea-drasl-f9c25665c203d6377ace62f1e95381d037d8fd9e.tar.xz | |
Refactor azalea-registry (#294)
* move registries in azalea-registry into separate modules
* rename Item and Block to ItemKind and BlockKind
* remove 'extra' registries from azalea-registry
* hide deprecated items from docs
* use DamageKindKey instead of Identifier when parsing registries
* store tag entries as a Vec instead of a HashSet
* sort tag values by protocol id
* update changelog
Diffstat (limited to 'azalea-protocol/src/common/recipe.rs')
| -rw-r--r-- | azalea-protocol/src/common/recipe.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/azalea-protocol/src/common/recipe.rs b/azalea-protocol/src/common/recipe.rs index 709679f1..43a64469 100644 --- a/azalea-protocol/src/common/recipe.rs +++ b/azalea-protocol/src/common/recipe.rs @@ -1,7 +1,6 @@ use azalea_buf::AzBuf; -use azalea_core::identifier::Identifier; use azalea_inventory::ItemStack; -use azalea_registry::HolderSet; +use azalea_registry::{HolderSet, builtin::ItemKind, identifier::Identifier}; /// [`azalea_registry::RecipeDisplay`] #[derive(Clone, Debug, AzBuf, PartialEq)] @@ -56,7 +55,7 @@ pub struct SmithingRecipeDisplay { #[derive(Clone, Debug, PartialEq, AzBuf)] pub struct Ingredient { - pub allowed: HolderSet<azalea_registry::Item, Identifier>, + pub allowed: HolderSet<ItemKind, Identifier>, } /// [`azalea_registry::SlotDisplay`] @@ -64,7 +63,7 @@ pub struct Ingredient { pub enum SlotDisplayData { Empty, AnyFuel, - Item(ItemStackDisplay), + ItemKind(ItemStackDisplay), ItemStack(ItemStackSlotDisplay), Tag(Identifier), SmithingTrim(Box<SmithingTrimDemoSlotDisplay>), @@ -74,7 +73,7 @@ pub enum SlotDisplayData { #[derive(Clone, Debug, PartialEq, AzBuf)] pub struct ItemStackDisplay { - pub item: azalea_registry::Item, + pub item: ItemKind, } #[derive(Clone, Debug, PartialEq, AzBuf)] pub struct ItemStackSlotDisplay { @@ -82,7 +81,7 @@ pub struct ItemStackSlotDisplay { } #[derive(Clone, Debug, PartialEq, AzBuf)] pub struct TagSlotDisplay { - pub tag: azalea_registry::Item, + pub tag: ItemKind, } #[derive(Clone, Debug, PartialEq, AzBuf)] pub struct SmithingTrimDemoSlotDisplay { |
