aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins/inventory
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/plugins/inventory
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/plugins/inventory')
-rw-r--r--azalea-client/src/plugins/inventory/equipment_effects.rs8
-rw-r--r--azalea-client/src/plugins/inventory/mod.rs3
2 files changed, 5 insertions, 6 deletions
diff --git a/azalea-client/src/plugins/inventory/equipment_effects.rs b/azalea-client/src/plugins/inventory/equipment_effects.rs
index 4294cc2f..c02f8ad5 100644
--- a/azalea-client/src/plugins/inventory/equipment_effects.rs
+++ b/azalea-client/src/plugins/inventory/equipment_effects.rs
@@ -2,15 +2,13 @@
use std::collections::HashMap;
-use azalea_core::{
- data_registry::ResolvableDataRegistry, identifier::Identifier,
- registry_holder::value::AttributeEffect,
-};
+use azalea_core::{data_registry::ResolvableDataRegistry, registry_holder::value::AttributeEffect};
use azalea_entity::{Attributes, inventory::Inventory};
use azalea_inventory::{
ItemStack,
components::{self, AttributeModifier, EquipmentSlot},
};
+use azalea_registry::identifier::Identifier;
use bevy_ecs::{
component::Component,
entity::Entity,
@@ -147,7 +145,7 @@ fn collect_attribute_modifiers_from_item(
slot: EquipmentSlot,
item: &ItemStack,
instance_holder: &InstanceHolder,
-) -> Vec<(azalea_registry::Attribute, AttributeModifier)> {
+) -> Vec<(azalea_registry::builtin::Attribute, AttributeModifier)> {
let mut modifiers = Vec::new();
// handle the attribute_modifiers component first
diff --git a/azalea-client/src/plugins/inventory/mod.rs b/azalea-client/src/plugins/inventory/mod.rs
index f0d4a9ce..93be9e96 100644
--- a/azalea-client/src/plugins/inventory/mod.rs
+++ b/azalea-client/src/plugins/inventory/mod.rs
@@ -10,7 +10,7 @@ use azalea_protocol::packets::game::{
s_container_close::ServerboundContainerClose,
s_set_carried_item::ServerboundSetCarriedItem,
};
-use azalea_registry::MenuKind;
+use azalea_registry::builtin::MenuKind;
use azalea_world::{InstanceContainer, InstanceName};
use bevy_app::{App, Plugin};
use bevy_ecs::prelude::*;
@@ -25,6 +25,7 @@ use crate::{
// TODO: when this is removed, remove the Inv alias above (which just exists to
// avoid conflicting with this pub deprecated type)
+#[doc(hidden)]
#[deprecated = "moved to `azalea_entity::inventory::Inventory`."]
pub type Inventory = azalea_entity::inventory::Inventory;