diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2025-12-12 00:56:02 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-12 00:56:02 -0600 |
| commit | f9c25665c203d6377ace62f1e95381d037d8fd9e (patch) | |
| tree | 8b4131d20fe661d3cc1175ec27f801fe61df41ea /azalea-inventory/tests | |
| parent | 82ad975242292d5875780b4398b62637674bf50a (diff) | |
| download | azalea-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-inventory/tests')
| -rw-r--r-- | azalea-inventory/tests/components.rs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/azalea-inventory/tests/components.rs b/azalea-inventory/tests/components.rs index b55eb71e..4a5af7ce 100644 --- a/azalea-inventory/tests/components.rs +++ b/azalea-inventory/tests/components.rs @@ -17,7 +17,7 @@ use azalea_inventory::{ PotDecorations, Rarity, }, }; -use azalea_registry::{Attribute, Block, Item}; +use azalea_registry::builtin::{Attribute, BlockKind, ItemKind}; use simdnbt::owned::{BaseNbt, Nbt, NbtCompound, NbtList, NbtTag}; #[test] @@ -79,7 +79,7 @@ fn test_can_place_on_checksum() { let c = CanPlaceOn { predicate: AdventureModePredicate { predicates: vec![BlockPredicate { - blocks: Some(vec![Block::GrassBlock].into()), + blocks: Some(vec![BlockKind::GrassBlock].into()), properties: None, nbt: None, }], @@ -150,7 +150,7 @@ fn test_firework_explosion_checksum() { #[test] fn test_charged_projectile_checksum() { let c = ChargedProjectiles { - items: vec![ItemStack::from(Item::MusicDiscCat)], + items: vec![ItemStack::from(ItemKind::MusicDiscCat)], }; assert_eq!(get_checksum(&c, &Default::default()).unwrap().0, 3435761017); @@ -160,10 +160,10 @@ fn test_charged_projectile_checksum() { fn test_charged_projectile_with_components_checksum() { let c = ChargedProjectiles { items: vec![ - ItemStack::from(Item::MusicDiscCat) + ItemStack::from(ItemKind::MusicDiscCat) .with_component::<JukeboxPlayable>(None) .with_component(ChargedProjectiles { - items: vec![ItemStack::from(Item::MusicDiscCat)], + items: vec![ItemStack::from(ItemKind::MusicDiscCat)], }), ], }; @@ -187,7 +187,12 @@ fn test_lodestone_tracker_checksum() { #[test] fn test_pot_decorations_checksum() { let c = PotDecorations { - items: vec![Item::Stick, Item::Brick, Item::Brick, Item::Brick], + items: vec![ + ItemKind::Stick, + ItemKind::Brick, + ItemKind::Brick, + ItemKind::Brick, + ], }; assert_eq!(get_checksum(&c, &Default::default()).unwrap().0, 1951715383); |
