From fbaae39cdf9c5a7a34005a51a37b85f7cdd5ea00 Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 13 Nov 2025 12:34:47 +0930 Subject: rename ResourceLocation to Identifier ahead of mojmap changes --- azalea-protocol/src/common/recipe.rs | 6 +++--- azalea-protocol/src/common/tags.rs | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'azalea-protocol/src/common') diff --git a/azalea-protocol/src/common/recipe.rs b/azalea-protocol/src/common/recipe.rs index 8ab2d5ba..709679f1 100644 --- a/azalea-protocol/src/common/recipe.rs +++ b/azalea-protocol/src/common/recipe.rs @@ -1,5 +1,5 @@ use azalea_buf::AzBuf; -use azalea_core::resource_location::ResourceLocation; +use azalea_core::identifier::Identifier; use azalea_inventory::ItemStack; use azalea_registry::HolderSet; @@ -56,7 +56,7 @@ pub struct SmithingRecipeDisplay { #[derive(Clone, Debug, PartialEq, AzBuf)] pub struct Ingredient { - pub allowed: HolderSet, + pub allowed: HolderSet, } /// [`azalea_registry::SlotDisplay`] @@ -66,7 +66,7 @@ pub enum SlotDisplayData { AnyFuel, Item(ItemStackDisplay), ItemStack(ItemStackSlotDisplay), - Tag(ResourceLocation), + Tag(Identifier), SmithingTrim(Box), WithRemainder(Box), Composite(CompositeSlotDisplay), diff --git a/azalea-protocol/src/common/tags.rs b/azalea-protocol/src/common/tags.rs index 0b798519..f8ddfc81 100644 --- a/azalea-protocol/src/common/tags.rs +++ b/azalea-protocol/src/common/tags.rs @@ -4,15 +4,15 @@ use std::{ }; use azalea_buf::{AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; -use azalea_core::resource_location::ResourceLocation; +use azalea_core::identifier::Identifier; use indexmap::IndexMap; #[derive(Clone, Debug, PartialEq)] -pub struct TagMap(pub IndexMap>); +pub struct TagMap(pub IndexMap>); #[derive(Clone, Debug, PartialEq)] pub struct Tags { - pub name: ResourceLocation, + pub name: Identifier, pub elements: Vec, } @@ -21,7 +21,7 @@ impl AzaleaRead for TagMap { let length = u32::azalea_read_var(buf)? as usize; let mut data = IndexMap::with_capacity(length); for _ in 0..length { - let tag_type = ResourceLocation::azalea_read(buf)?; + let tag_type = Identifier::azalea_read(buf)?; let tags_count = i32::azalea_read_var(buf)? as usize; let mut tags_vec = Vec::with_capacity(tags_count); for _ in 0..tags_count { @@ -46,7 +46,7 @@ impl AzaleaWrite for TagMap { } impl AzaleaRead for Tags { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { - let name = ResourceLocation::azalea_read(buf)?; + let name = Identifier::azalea_read(buf)?; let elements = Vec::::azalea_read_var(buf)?; Ok(Tags { name, elements }) } @@ -61,7 +61,7 @@ impl AzaleaWrite for Tags { } impl Deref for TagMap { - type Target = IndexMap>; + type Target = IndexMap>; fn deref(&self) -> &Self::Target { &self.0 -- cgit v1.2.3