aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/client.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-12-12 00:56:02 -0600
committerGitHub <noreply@github.com>2025-12-12 00:56:02 -0600
commitf9c25665c203d6377ace62f1e95381d037d8fd9e (patch)
tree8b4131d20fe661d3cc1175ec27f801fe61df41ea /azalea-client/src/client.rs
parent82ad975242292d5875780b4398b62637674bf50a (diff)
downloadazalea-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-client/src/client.rs')
-rw-r--r--azalea-client/src/client.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs
index 970d8da0..aa2da1d5 100644
--- a/azalea-client/src/client.rs
+++ b/azalea-client/src/client.rs
@@ -10,7 +10,9 @@ use std::{
use azalea_auth::game_profile::GameProfile;
use azalea_core::{
- data_registry::ResolvableDataRegistry, identifier::Identifier, position::Vec3, tick::GameTick,
+ data_registry::{DataRegistryWithKey, ResolvableDataRegistry},
+ position::Vec3,
+ tick::GameTick,
};
use azalea_entity::{
Attributes, EntityUpdateSystems, PlayerAbilities, Position,
@@ -26,6 +28,7 @@ use azalea_protocol::{
packets::{Packet, game::ServerboundGamePacket},
resolve,
};
+use azalea_registry::{DataRegistryKeyRef, identifier::Identifier};
use azalea_world::{Instance, InstanceContainer, InstanceName, MinecraftEntityId, PartialInstance};
use bevy_app::{App, AppExit, Plugin, PluginsState, SubApp, Update};
use bevy_ecs::{
@@ -517,7 +520,7 @@ impl Client {
&self,
registry: &impl ResolvableDataRegistry,
) -> Option<Identifier> {
- self.with_registry_holder(|registries| registry.resolve_name(registries).cloned())
+ self.with_registry_holder(|registries| registry.key(registries).map(|r| r.into_ident()))
}
/// Resolve the given registry to its name and data and call the given
/// function with it.