diff options
| author | mat <git@matdoes.dev> | 2025-11-13 12:34:47 +0930 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-11-13 07:04:52 +0400 |
| commit | fbaae39cdf9c5a7a34005a51a37b85f7cdd5ea00 (patch) | |
| tree | 3126fb34a4e0ac979a1103a8227a2b9a136c1553 /azalea-inventory/src | |
| parent | a4312599f7c04709a92b7be238dcf577bafbb14f (diff) | |
| download | azalea-drasl-fbaae39cdf9c5a7a34005a51a37b85f7cdd5ea00.tar.xz | |
rename ResourceLocation to Identifier ahead of mojmap changes
Diffstat (limited to 'azalea-inventory/src')
| -rw-r--r-- | azalea-inventory/src/components/mod.rs | 44 | ||||
| -rw-r--r-- | azalea-inventory/src/components/profile.rs | 4 | ||||
| -rw-r--r-- | azalea-inventory/src/item/consume_effect.rs | 4 |
3 files changed, 26 insertions, 26 deletions
diff --git a/azalea-inventory/src/components/mod.rs b/azalea-inventory/src/components/mod.rs index 7f3fa831..34d0a9b4 100644 --- a/azalea-inventory/src/components/mod.rs +++ b/azalea-inventory/src/components/mod.rs @@ -14,9 +14,9 @@ use azalea_core::{ checksum::{Checksum, get_checksum}, codec_utils::*, filterable::Filterable, + identifier::Identifier, position::GlobalPos, registry_holder::RegistryHolder, - resource_location::ResourceLocation, sound::CustomSound, }; use azalea_registry::{ @@ -372,7 +372,7 @@ pub struct BlockStatePropertyMatcher { #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] pub struct BlockPredicate { #[serde(skip_serializing_if = "is_default")] - pub blocks: Option<HolderSet<Block, ResourceLocation>>, + pub blocks: Option<HolderSet<Block, Identifier>>, #[serde(skip_serializing_if = "is_default")] pub properties: Option<Vec<BlockStatePropertyMatcher>>, #[serde(skip_serializing_if = "is_default")] @@ -426,7 +426,7 @@ pub enum AttributeModifierOperation { // circular dependency) #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] pub struct AttributeModifier { - pub id: ResourceLocation, + pub id: Identifier, pub amount: f64, pub operation: AttributeModifierOperation, } @@ -558,7 +558,7 @@ impl Food { #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] pub struct ToolRule { - pub blocks: HolderSet<Block, ResourceLocation>, + pub blocks: HolderSet<Block, Identifier>, #[serde(skip_serializing_if = "is_default")] pub speed: Option<f32>, #[serde(skip_serializing_if = "is_default")] @@ -779,7 +779,7 @@ pub struct OminousBottleAmplifier { #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] #[serde(transparent)] pub struct Recipes { - pub recipes: Vec<ResourceLocation>, + pub recipes: Vec<Identifier>, } #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] @@ -839,7 +839,7 @@ impl Default for Fireworks { #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] #[serde(transparent)] pub struct NoteBlockSound { - pub sound: ResourceLocation, + pub sound: Identifier, } #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] @@ -930,7 +930,7 @@ pub struct ContainerLoot { #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] #[serde(untagged)] pub enum JukeboxPlayable { - Referenced(ResourceLocation), + Referenced(Identifier), Direct(Holder<registry::JukeboxSong, JukeboxSongData>), } @@ -1006,7 +1006,7 @@ pub struct UseRemainder { pub struct UseCooldown { pub seconds: f32, #[serde(skip_serializing_if = "is_default")] - pub cooldown_group: Option<ResourceLocation>, + pub cooldown_group: Option<Identifier>, } impl UseCooldown { @@ -1031,19 +1031,19 @@ pub struct Enchantable { #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] pub struct Repairable { - pub items: HolderSet<Item, ResourceLocation>, + pub items: HolderSet<Item, Identifier>, } #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] #[serde(transparent)] pub struct ItemModel { - pub resource_location: ResourceLocation, + pub resource_location: Identifier, } #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] pub struct DamageResistant { /// In vanilla this only allows tag keys, i.e. it must start with '#' - pub types: ResourceLocation, + pub types: Identifier, } #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] @@ -1052,11 +1052,11 @@ pub struct Equippable { #[serde(skip_serializing_if = "is_default_equip_sound")] pub equip_sound: SoundEvent, #[serde(skip_serializing_if = "is_default")] - pub asset_id: Option<ResourceLocation>, + pub asset_id: Option<Identifier>, #[serde(skip_serializing_if = "is_default")] - pub camera_overlay: Option<ResourceLocation>, + pub camera_overlay: Option<Identifier>, #[serde(skip_serializing_if = "is_default")] - pub allowed_entities: Option<HolderSet<EntityKind, ResourceLocation>>, + pub allowed_entities: Option<HolderSet<EntityKind, Identifier>>, #[serde(skip_serializing_if = "is_true")] pub dispensable: bool, #[serde(skip_serializing_if = "is_true")] @@ -1119,7 +1119,7 @@ pub struct Glider; #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] #[serde(transparent)] pub struct TooltipStyle { - pub resource_location: ResourceLocation, + pub resource_location: Identifier, } #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] @@ -1268,7 +1268,7 @@ pub struct PaintingVariantData { pub width: i32, #[var] pub height: i32, - pub asset_id: ResourceLocation, + pub asset_id: Identifier, #[serde(skip_serializing_if = "is_default")] pub title: Option<FormattedText>, #[serde(skip_serializing_if = "is_default")] @@ -1344,7 +1344,7 @@ pub struct BlocksAttacks { #[serde(skip_serializing_if = "is_default")] pub item_damage: ItemDamageFunction, #[serde(skip_serializing_if = "is_default")] - pub bypassed_by: Option<ResourceLocation>, + pub bypassed_by: Option<Identifier>, #[serde(skip_serializing_if = "is_default")] pub block_sound: Option<azalea_registry::Holder<SoundEvent, CustomSound>>, #[serde(skip_serializing_if = "is_default")] @@ -1383,7 +1383,7 @@ pub struct DamageReduction { #[serde(skip_serializing_if = "is_default_horizontal_blocking_angle")] pub horizontal_blocking_angle: f32, #[serde(skip_serializing_if = "is_default")] - pub kind: Option<HolderSet<DamageKind, ResourceLocation>>, + pub kind: Option<HolderSet<DamageKind, Identifier>>, pub base: f32, pub factor: f32, } @@ -1409,7 +1409,7 @@ impl Default for ItemDamageFunction { #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] #[serde(untagged)] pub enum ProvidesTrimMaterial { - Referenced(ResourceLocation), + Referenced(Identifier), Direct(Holder<TrimMaterial, DirectTrimMaterial>), } @@ -1422,7 +1422,7 @@ pub struct DirectTrimMaterial { pub struct MaterialAssetGroup { pub base: AssetInfo, #[serde(skip_serializing_if = "is_default")] - pub overrides: Vec<(ResourceLocation, AssetInfo)>, + pub overrides: Vec<(Identifier, AssetInfo)>, } #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] @@ -1433,7 +1433,7 @@ pub struct AssetInfo { #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] #[serde(transparent)] pub struct ProvidesBannerPatterns { - pub key: ResourceLocation, + pub key: Identifier, } #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] @@ -1457,7 +1457,7 @@ pub struct CowVariant { #[derive(Clone, PartialEq, AzBuf, Debug, Serialize)] #[serde(untagged)] pub enum ChickenVariant { - Referenced(ResourceLocation), + Referenced(Identifier), Direct(ChickenVariantData), } diff --git a/azalea-inventory/src/components/profile.rs b/azalea-inventory/src/components/profile.rs index 499d42bb..153b43d3 100644 --- a/azalea-inventory/src/components/profile.rs +++ b/azalea-inventory/src/components/profile.rs @@ -2,7 +2,7 @@ use azalea_auth::game_profile::{ GameProfile, GameProfileProperties, SerializableProfileProperties, }; use azalea_buf::AzBuf; -use azalea_core::{codec_utils::*, resource_location::ResourceLocation}; +use azalea_core::{codec_utils::*, identifier::Identifier}; use serde::{Serialize, Serializer}; use uuid::Uuid; @@ -70,5 +70,5 @@ pub enum PlayerModelType { #[derive(Clone, Debug, AzBuf, PartialEq, Serialize)] #[serde(transparent)] pub struct ResourceTexture { - pub id: ResourceLocation, + pub id: Identifier, } diff --git a/azalea-inventory/src/item/consume_effect.rs b/azalea-inventory/src/item/consume_effect.rs index 8aab42b8..7054e6c8 100644 --- a/azalea-inventory/src/item/consume_effect.rs +++ b/azalea-inventory/src/item/consume_effect.rs @@ -1,5 +1,5 @@ use azalea_buf::AzBuf; -use azalea_core::{codec_utils::is_default, resource_location::ResourceLocation}; +use azalea_core::{codec_utils::is_default, identifier::Identifier}; use azalea_registry::{HolderSet, MobEffect, SoundEvent}; use serde::Serialize; @@ -16,7 +16,7 @@ pub enum ConsumeEffect { }, RemoveEffects { #[serde(skip_serializing_if = "is_default")] - effects: HolderSet<MobEffect, ResourceLocation>, + effects: HolderSet<MobEffect, Identifier>, }, ClearAllEffects, TeleportRandomly { |
