aboutsummaryrefslogtreecommitdiff
path: root/azalea-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-core/src')
-rw-r--r--azalea-core/src/data_registry.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/azalea-core/src/data_registry.rs b/azalea-core/src/data_registry.rs
index 07837b19..90628f47 100644
--- a/azalea-core/src/data_registry.rs
+++ b/azalea-core/src/data_registry.rs
@@ -16,6 +16,13 @@ pub trait DataRegistryWithKey: DataRegistry {
.protocol_id_to_identifier(Identifier::from(Self::NAME), self.protocol_id())
.map(DataRegistryKeyRef::from_ident)
}
+
+ fn key_owned<'s, 'a: 's>(&'s self, registries: &'a RegistryHolder) -> Option<Self::Key> {
+ registries
+ .protocol_id_to_identifier(Identifier::from(Self::NAME), self.protocol_id())
+ .cloned()
+ .map(DataRegistryKey::from_ident)
+ }
}
impl<R: DataRegistry> DataRegistryWithKey for R {}