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-client/src/plugins/packet/game/events.rs | 2 +- azalea-client/src/plugins/packet/game/mod.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'azalea-client/src/plugins/packet') diff --git a/azalea-client/src/plugins/packet/game/events.rs b/azalea-client/src/plugins/packet/game/events.rs index 53d93855..9ce4c252 100644 --- a/azalea-client/src/plugins/packet/game/events.rs +++ b/azalea-client/src/plugins/packet/game/events.rs @@ -1,11 +1,11 @@ use std::sync::{Arc, Weak}; use azalea_chat::FormattedText; -use azalea_core::identifier::Identifier; use azalea_protocol::packets::{ Packet, game::{ClientboundGamePacket, ClientboundPlayerCombatKill, ServerboundGamePacket}, }; +use azalea_registry::identifier::Identifier; use azalea_world::Instance; use bevy_ecs::prelude::*; use parking_lot::RwLock; diff --git a/azalea-client/src/plugins/packet/game/mod.rs b/azalea-client/src/plugins/packet/game/mod.rs index 7446a506..89b33274 100644 --- a/azalea-client/src/plugins/packet/game/mod.rs +++ b/azalea-client/src/plugins/packet/game/mod.rs @@ -17,6 +17,7 @@ use azalea_protocol::{ common::movements::MoveFlags, packets::{ConnectionProtocol, game::*}, }; +use azalea_registry::builtin::EntityKind; use azalea_world::{InstanceContainer, InstanceName, MinecraftEntityId, PartialInstance}; use bevy_ecs::{prelude::*, system::SystemState}; pub use events::*; @@ -292,7 +293,7 @@ impl GamePacketHandler<'_> { let entity_bundle = EntityBundle::new( game_profile.uuid, Vec3::ZERO, - azalea_registry::EntityKind::Player, + EntityKind::Player, new_instance_name, ); let entity_id = p.player_id; @@ -1478,7 +1479,7 @@ impl GamePacketHandler<'_> { let entity_bundle = EntityBundle::new( game_profile.uuid, Vec3::ZERO, - azalea_registry::EntityKind::Player, + EntityKind::Player, new_instance_name, ); // update the local gamemode and metadata things -- cgit v1.2.3