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/src/lib.rs | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'azalea/src/lib.rs') diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs index bf188791..8440e31f 100644 --- a/azalea/src/lib.rs +++ b/azalea/src/lib.rs @@ -15,24 +15,33 @@ use std::{net::SocketAddr, time::Duration}; use app::Plugins; pub use azalea_auth as auth; -pub use azalea_block as blocks; +pub use azalea_block as block; +#[doc(hidden)] +#[deprecated = "moved to `azalea::block`"] +pub mod blocks { + pub type BlockStates = azalea_block::BlockStates; + pub type BlockState = azalea_block::BlockState; + pub trait BlockTrait: azalea_block::BlockTrait {} + // azalea_block has more items but rust doesn't mark them deprecated if we + // `use azalea_block::*`, so hopefully the three types above are enough for + // most users :( +} + pub use azalea_brigadier as brigadier; pub use azalea_buf as buf; pub use azalea_chat::FormattedText; pub use azalea_client::*; pub use azalea_core as core; -#[deprecated(note = "renamed to `Identifier`.")] -#[expect(deprecated)] -pub use azalea_core::resource_location::ResourceLocation; // these are re-exported on this level because they're very common -pub use azalea_core::{ - identifier::Identifier, - position::{BlockPos, Vec3}, -}; +pub use azalea_core::position::{BlockPos, Vec3}; pub use azalea_entity as entity; pub use azalea_physics as physics; pub use azalea_protocol as protocol; pub use azalea_registry as registry; +#[doc(hidden)] +#[deprecated(note = "renamed to `Identifier`.")] +pub use azalea_registry::identifier::Identifier as ResourceLocation; +pub use azalea_registry::identifier::Identifier; pub use azalea_world as world; pub use bevy_app as app; use bevy_app::AppExit; -- cgit v1.2.3