From f9c25665c203d6377ace62f1e95381d037d8fd9e Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Fri, 12 Dec 2025 00:56:02 -0600 Subject: 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 --- azalea-protocol/src/packets/common.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'azalea-protocol/src/packets/common.rs') diff --git a/azalea-protocol/src/packets/common.rs b/azalea-protocol/src/packets/common.rs index eb377683..a6cfc03f 100644 --- a/azalea-protocol/src/packets/common.rs +++ b/azalea-protocol/src/packets/common.rs @@ -2,15 +2,15 @@ use azalea_buf::AzBuf; use azalea_core::{ data_registry::ResolvableDataRegistry, game_type::{GameMode, OptionalGameType}, - identifier::Identifier, position::GlobalPos, - registry_holder::{RegistryHolder, dimension_type::DimensionTypeElement}, + registry_holder::{RegistryHolder, dimension_type::DimensionKindElement}, }; +use azalea_registry::{data::DimensionKind, identifier::Identifier}; use tracing::error; #[derive(Clone, Debug, AzBuf, PartialEq)] pub struct CommonPlayerSpawnInfo { - pub dimension_type: azalea_registry::DimensionType, + pub dimension_type: DimensionKind, pub dimension: Identifier, pub seed: i64, pub game_type: GameMode, @@ -27,7 +27,7 @@ impl CommonPlayerSpawnInfo { pub fn dimension_type<'a>( &self, registry_holder: &'a RegistryHolder, - ) -> Option<(&'a Identifier, &'a DimensionTypeElement)> { + ) -> Option<(&'a Identifier, &'a DimensionKindElement)> { let dimension_res = self.dimension_type.resolve(registry_holder); let Some((dimension_type, dimension_data)) = dimension_res else { error!("Couldn't resolve dimension_type {:?}", self.dimension_type); -- cgit v1.2.3