aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/tests
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/tests
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/tests')
-rw-r--r--azalea-client/tests/change_dimension_to_nether_and_back.rs16
-rw-r--r--azalea-client/tests/close_open_container.rs2
-rw-r--r--azalea-client/tests/correct_movement.rs4
-rw-r--r--azalea-client/tests/correct_sneak_movement.rs6
-rw-r--r--azalea-client/tests/correct_sprint_sneak_movement.rs6
-rw-r--r--azalea-client/tests/despawn_entities_when_changing_dimension.rs10
-rw-r--r--azalea-client/tests/enchantments.rs9
-rw-r--r--azalea-client/tests/fast_login.rs2
-rw-r--r--azalea-client/tests/login_to_dimension_with_same_name.rs12
-rw-r--r--azalea-client/tests/mine_block_rollback.rs10
-rw-r--r--azalea-client/tests/mine_block_timing_hand.rs9
-rw-r--r--azalea-client/tests/mine_block_without_rollback.rs12
-rw-r--r--azalea-client/tests/move_and_despawn_entity.rs2
-rw-r--r--azalea-client/tests/move_despawned_entity.rs2
-rw-r--r--azalea-client/tests/packet_order.rs6
-rw-r--r--azalea-client/tests/packet_order_set_carried_item.rs9
-rw-r--r--azalea-client/tests/receive_spawn_entity_and_start_config_packet.rs2
-rw-r--r--azalea-client/tests/reply_to_ping_with_pong.rs2
-rw-r--r--azalea-client/tests/set_health_before_login.rs2
-rw-r--r--azalea-client/tests/teleport_movement.rs4
20 files changed, 67 insertions, 60 deletions
diff --git a/azalea-client/tests/change_dimension_to_nether_and_back.rs b/azalea-client/tests/change_dimension_to_nether_and_back.rs
index 9594da04..134c7cbf 100644
--- a/azalea-client/tests/change_dimension_to_nether_and_back.rs
+++ b/azalea-client/tests/change_dimension_to_nether_and_back.rs
@@ -1,11 +1,11 @@
use azalea_client::{InConfigState, InGameState, test_utils::prelude::*};
-use azalea_core::{identifier::Identifier, position::ChunkPos};
+use azalea_core::position::ChunkPos;
use azalea_entity::LocalEntity;
use azalea_protocol::packets::{
ConnectionProtocol, Packet,
config::{ClientboundFinishConfiguration, ClientboundRegistryData},
};
-use azalea_registry::{DataRegistry, DimensionType};
+use azalea_registry::{DataRegistry, data::DimensionKind, identifier::Identifier};
use azalea_world::InstanceName;
use simdnbt::owned::{NbtCompound, NbtTag};
@@ -19,11 +19,11 @@ fn test_change_dimension_to_nether_and_back() {
fn generic_test_change_dimension_to_nether_and_back(using_respawn: bool) {
let make_basic_login_or_respawn_packet = if using_respawn {
- |dimension: DimensionType, instance_name: Identifier| {
+ |dimension: DimensionKind, instance_name: Identifier| {
make_basic_respawn_packet(dimension, instance_name).into_variant()
}
} else {
- |dimension: DimensionType, instance_name: Identifier| {
+ |dimension: DimensionKind, instance_name: Identifier| {
make_basic_login_packet(dimension, instance_name).into_variant()
}
};
@@ -75,7 +75,7 @@ fn generic_test_change_dimension_to_nether_and_back(using_respawn: bool) {
//
simulation.receive_packet(make_basic_login_packet(
- DimensionType::new_raw(1), // overworld
+ DimensionKind::new_raw(1), // overworld
Identifier::new("azalea:a"),
));
simulation.tick();
@@ -98,7 +98,7 @@ fn generic_test_change_dimension_to_nether_and_back(using_respawn: bool) {
//
simulation.receive_packet(make_basic_login_or_respawn_packet(
- DimensionType::new_raw(2), // nether
+ DimensionKind::new_raw(2), // nether
Identifier::new("azalea:b"),
));
simulation.tick();
@@ -120,7 +120,7 @@ fn generic_test_change_dimension_to_nether_and_back(using_respawn: bool) {
.chunk(ChunkPos::new(0, 0))
.expect("chunk should exist");
simulation.receive_packet(make_basic_login_or_respawn_packet(
- DimensionType::new_raw(2), // nether
+ DimensionKind::new_raw(2), // nether
Identifier::new("minecraft:nether"),
));
simulation.tick();
@@ -130,7 +130,7 @@ fn generic_test_change_dimension_to_nether_and_back(using_respawn: bool) {
//
simulation.receive_packet(make_basic_login_packet(
- DimensionType::new_raw(1), // overworld
+ DimensionKind::new_raw(1), // overworld
Identifier::new("azalea:a"),
));
simulation.tick();
diff --git a/azalea-client/tests/close_open_container.rs b/azalea-client/tests/close_open_container.rs
index 96978c59..32a9874d 100644
--- a/azalea-client/tests/close_open_container.rs
+++ b/azalea-client/tests/close_open_container.rs
@@ -6,7 +6,7 @@ use azalea_protocol::packets::{
ConnectionProtocol,
game::{ClientboundContainerClose, ClientboundOpenScreen, ClientboundSetChunkCacheCenter},
};
-use azalea_registry::MenuKind;
+use azalea_registry::builtin::MenuKind;
#[test]
fn test_close_open_container() {
diff --git a/azalea-client/tests/correct_movement.rs b/azalea-client/tests/correct_movement.rs
index 5aaea9a3..de494111 100644
--- a/azalea-client/tests/correct_movement.rs
+++ b/azalea-client/tests/correct_movement.rs
@@ -11,7 +11,7 @@ use azalea_protocol::{
},
},
};
-use azalea_registry::Block;
+use azalea_registry::builtin::BlockKind;
#[test]
fn test_correct_movement() {
@@ -34,7 +34,7 @@ fn test_correct_movement() {
));
simulation.receive_packet(ClientboundBlockUpdate {
pos: BlockPos::new(31, 63, 370),
- block_state: Block::Stone.into(),
+ block_state: BlockKind::Stone.into(),
});
simulation.receive_packet(ClientboundPlayerPosition {
id: 1,
diff --git a/azalea-client/tests/correct_sneak_movement.rs b/azalea-client/tests/correct_sneak_movement.rs
index 0e06633a..1186ce8b 100644
--- a/azalea-client/tests/correct_sneak_movement.rs
+++ b/azalea-client/tests/correct_sneak_movement.rs
@@ -11,7 +11,7 @@ use azalea_protocol::{
},
},
};
-use azalea_registry::Block;
+use azalea_registry::builtin::BlockKind;
#[test]
fn test_correct_sneak_movement() {
@@ -29,11 +29,11 @@ fn test_correct_sneak_movement() {
simulation.receive_packet(make_basic_empty_chunk(ChunkPos::new(0, 0), (384 + 64) / 16));
simulation.receive_packet(ClientboundBlockUpdate {
pos: BlockPos::new(0, 119, 0),
- block_state: Block::Stone.into(),
+ block_state: BlockKind::Stone.into(),
});
simulation.receive_packet(ClientboundBlockUpdate {
pos: BlockPos::new(0, 119, 1),
- block_state: Block::Stone.into(),
+ block_state: BlockKind::Stone.into(),
});
simulation.receive_packet(ClientboundPlayerPosition {
id: 1,
diff --git a/azalea-client/tests/correct_sprint_sneak_movement.rs b/azalea-client/tests/correct_sprint_sneak_movement.rs
index c76bc158..8ab955b8 100644
--- a/azalea-client/tests/correct_sprint_sneak_movement.rs
+++ b/azalea-client/tests/correct_sprint_sneak_movement.rs
@@ -11,7 +11,7 @@ use azalea_protocol::{
},
},
};
-use azalea_registry::Block;
+use azalea_registry::builtin::BlockKind;
#[test]
fn test_correct_sprint_sneak_movement() {
@@ -29,11 +29,11 @@ fn test_correct_sprint_sneak_movement() {
simulation.receive_packet(make_basic_empty_chunk(ChunkPos::new(0, 0), (384 + 64) / 16));
simulation.receive_packet(ClientboundBlockUpdate {
pos: BlockPos::new(0, 119, 0),
- block_state: Block::Stone.into(),
+ block_state: BlockKind::Stone.into(),
});
simulation.receive_packet(ClientboundBlockUpdate {
pos: BlockPos::new(0, 119, 1),
- block_state: Block::Stone.into(),
+ block_state: BlockKind::Stone.into(),
});
simulation.receive_packet(ClientboundPlayerPosition {
id: 1,
diff --git a/azalea-client/tests/despawn_entities_when_changing_dimension.rs b/azalea-client/tests/despawn_entities_when_changing_dimension.rs
index 38388c04..466da948 100644
--- a/azalea-client/tests/despawn_entities_when_changing_dimension.rs
+++ b/azalea-client/tests/despawn_entities_when_changing_dimension.rs
@@ -1,11 +1,13 @@
use azalea_client::test_utils::prelude::*;
-use azalea_core::{identifier::Identifier, position::ChunkPos};
+use azalea_core::position::ChunkPos;
use azalea_entity::metadata::Cow;
use azalea_protocol::packets::{
ConnectionProtocol,
config::{ClientboundFinishConfiguration, ClientboundRegistryData},
};
-use azalea_registry::{DataRegistry, DimensionType, EntityKind};
+use azalea_registry::{
+ DataRegistry, builtin::EntityKind, data::DimensionKind, identifier::Identifier,
+};
use bevy_ecs::query::With;
use simdnbt::owned::{NbtCompound, NbtTag};
@@ -44,7 +46,7 @@ fn test_despawn_entities_when_changing_dimension() {
//
simulation.receive_packet(make_basic_login_packet(
- DimensionType::new_raw(0), // overworld
+ DimensionKind::new_raw(0), // overworld
Identifier::new("azalea:a"),
));
simulation.tick();
@@ -64,7 +66,7 @@ fn test_despawn_entities_when_changing_dimension() {
//
simulation.receive_packet(make_basic_respawn_packet(
- DimensionType::new_raw(1), // nether
+ DimensionKind::new_raw(1), // nether
Identifier::new("azalea:b"),
));
simulation.tick();
diff --git a/azalea-client/tests/enchantments.rs b/azalea-client/tests/enchantments.rs
index 55b7c452..8e1a695c 100644
--- a/azalea-client/tests/enchantments.rs
+++ b/azalea-client/tests/enchantments.rs
@@ -1,5 +1,4 @@
use azalea_client::test_utils::prelude::*;
-use azalea_core::identifier::Identifier;
use azalea_entity::Attributes;
use azalea_inventory::{ItemStack, components::Enchantments};
use azalea_protocol::packets::{
@@ -7,7 +6,7 @@ use azalea_protocol::packets::{
config::{ClientboundFinishConfiguration, ClientboundRegistryData},
game::ClientboundContainerSetSlot,
};
-use azalea_registry::{Enchantment, Item, Registry};
+use azalea_registry::{Registry, builtin::ItemKind, data::Enchantment, identifier::Identifier};
use simdnbt::owned::{NbtCompound, NbtTag};
#[test]
@@ -92,7 +91,7 @@ fn test_enchantments() {
container_id: 0,
state_id: 1,
slot: *azalea_inventory::Player::HOTBAR_SLOTS.start() as u16,
- item_stack: Item::DiamondPickaxe.into(),
+ item_stack: ItemKind::DiamondPickaxe.into(),
});
s.tick();
@@ -103,7 +102,7 @@ fn test_enchantments() {
container_id: 0,
state_id: 2,
slot: *azalea_inventory::Player::HOTBAR_SLOTS.start() as u16,
- item_stack: ItemStack::from(Item::DiamondPickaxe).with_component(Enchantments {
+ item_stack: ItemStack::from(ItemKind::DiamondPickaxe).with_component(Enchantments {
levels: [(Enchantment::from_u32(0).unwrap(), 1)].into(),
}),
});
@@ -116,7 +115,7 @@ fn test_enchantments() {
container_id: 0,
state_id: 1,
slot: *azalea_inventory::Player::HOTBAR_SLOTS.start() as u16,
- item_stack: Item::DiamondPickaxe.into(),
+ item_stack: ItemKind::DiamondPickaxe.into(),
});
s.tick();
diff --git a/azalea-client/tests/fast_login.rs b/azalea-client/tests/fast_login.rs
index 7962d79e..5a653425 100644
--- a/azalea-client/tests/fast_login.rs
+++ b/azalea-client/tests/fast_login.rs
@@ -1,11 +1,11 @@
use azalea_client::{InConfigState, test_utils::prelude::*};
-use azalea_core::identifier::Identifier;
use azalea_entity::metadata::Health;
use azalea_protocol::packets::{
ConnectionProtocol,
config::{ClientboundFinishConfiguration, ClientboundRegistryData},
game::ClientboundSetHealth,
};
+use azalea_registry::identifier::Identifier;
use simdnbt::owned::{NbtCompound, NbtTag};
#[test]
diff --git a/azalea-client/tests/login_to_dimension_with_same_name.rs b/azalea-client/tests/login_to_dimension_with_same_name.rs
index 0a28cfd3..4adced62 100644
--- a/azalea-client/tests/login_to_dimension_with_same_name.rs
+++ b/azalea-client/tests/login_to_dimension_with_same_name.rs
@@ -1,14 +1,14 @@
use azalea_client::{
InConfigState, InGameState, local_player::InstanceHolder, test_utils::prelude::*,
};
-use azalea_core::{identifier::Identifier, position::ChunkPos};
+use azalea_core::position::ChunkPos;
use azalea_entity::LocalEntity;
use azalea_protocol::packets::{
ConnectionProtocol, Packet,
config::{ClientboundFinishConfiguration, ClientboundRegistryData},
game::ClientboundStartConfiguration,
};
-use azalea_registry::{DataRegistry, DimensionType};
+use azalea_registry::{DataRegistry, data::DimensionKind, identifier::Identifier};
use azalea_world::InstanceName;
use simdnbt::owned::{NbtCompound, NbtTag};
@@ -22,11 +22,11 @@ fn test_login_to_dimension_with_same_name() {
fn generic_test_login_to_dimension_with_same_name(using_respawn: bool) {
let make_basic_login_or_respawn_packet = if using_respawn {
- |dimension: DimensionType, instance_name: Identifier| {
+ |dimension: DimensionKind, instance_name: Identifier| {
make_basic_respawn_packet(dimension, instance_name).into_variant()
}
} else {
- |dimension: DimensionType, instance_name: Identifier| {
+ |dimension: DimensionKind, instance_name: Identifier| {
make_basic_login_packet(dimension, instance_name).into_variant()
}
};
@@ -60,7 +60,7 @@ fn generic_test_login_to_dimension_with_same_name(using_respawn: bool) {
//
simulation.receive_packet(make_basic_login_packet(
- DimensionType::new_raw(0), // overworld
+ DimensionKind::new_raw(0), // overworld
Identifier::new("azalea:overworld"),
));
simulation.tick();
@@ -97,7 +97,7 @@ fn generic_test_login_to_dimension_with_same_name(using_respawn: bool) {
});
simulation.receive_packet(ClientboundFinishConfiguration);
simulation.receive_packet(make_basic_login_or_respawn_packet(
- DimensionType::new_raw(0),
+ DimensionKind::new_raw(0),
Identifier::new("azalea:overworld"),
));
simulation.tick();
diff --git a/azalea-client/tests/mine_block_rollback.rs b/azalea-client/tests/mine_block_rollback.rs
index 44ad629f..7d2ed1a5 100644
--- a/azalea-client/tests/mine_block_rollback.rs
+++ b/azalea-client/tests/mine_block_rollback.rs
@@ -4,7 +4,7 @@ use azalea_protocol::packets::{
ConnectionProtocol,
game::{ClientboundBlockChangedAck, ClientboundBlockUpdate},
};
-use azalea_registry::Block;
+use azalea_registry::builtin::BlockKind;
#[test]
fn test_mine_block_rollback() {
@@ -21,10 +21,10 @@ fn test_mine_block_rollback() {
pos,
// tnt is used for this test because it's insta-mineable so we don't have to waste ticks
// waiting
- block_state: Block::Tnt.into(),
+ block_state: BlockKind::Tnt.into(),
});
simulation.tick();
- assert_eq!(simulation.get_block_state(pos), Some(Block::Tnt.into()));
+ assert_eq!(simulation.get_block_state(pos), Some(BlockKind::Tnt.into()));
println!("set serverside tnt");
simulation.write_message(StartMiningBlockEvent {
@@ -33,12 +33,12 @@ fn test_mine_block_rollback() {
force: true,
});
simulation.tick();
- assert_eq!(simulation.get_block_state(pos), Some(Block::Air.into()));
+ assert_eq!(simulation.get_block_state(pos), Some(BlockKind::Air.into()));
println!("set clientside air");
// server didn't send the new block, so the change should be rolled back
simulation.receive_packet(ClientboundBlockChangedAck { seq: 1 });
simulation.tick();
- assert_eq!(simulation.get_block_state(pos), Some(Block::Tnt.into()));
+ assert_eq!(simulation.get_block_state(pos), Some(BlockKind::Tnt.into()));
println!("reset serverside tnt");
}
diff --git a/azalea-client/tests/mine_block_timing_hand.rs b/azalea-client/tests/mine_block_timing_hand.rs
index 650e630e..6f583e7b 100644
--- a/azalea-client/tests/mine_block_timing_hand.rs
+++ b/azalea-client/tests/mine_block_timing_hand.rs
@@ -15,7 +15,7 @@ use azalea_protocol::{
},
},
};
-use azalea_registry::Block;
+use azalea_registry::builtin::BlockKind;
#[test]
fn test_mine_block_timing_hand() {
@@ -31,7 +31,7 @@ fn test_mine_block_timing_hand() {
let pos = BlockPos::new(0, 2, 0);
simulation.receive_packet(ClientboundBlockUpdate {
pos,
- block_state: Block::Stone.into(),
+ block_state: BlockKind::Stone.into(),
});
simulation.receive_packet(ClientboundPlayerPosition {
id: 1,
@@ -43,7 +43,10 @@ fn test_mine_block_timing_hand() {
relative: RelativeMovements::all_absolute(),
});
simulation.tick();
- assert_eq!(simulation.get_block_state(pos), Some(Block::Stone.into()));
+ assert_eq!(
+ simulation.get_block_state(pos),
+ Some(BlockKind::Stone.into())
+ );
println!("set serverside stone");
simulation.with_component_mut::<LookDirection>(|look| {
// look down
diff --git a/azalea-client/tests/mine_block_without_rollback.rs b/azalea-client/tests/mine_block_without_rollback.rs
index a5a437a0..b6020ea2 100644
--- a/azalea-client/tests/mine_block_without_rollback.rs
+++ b/azalea-client/tests/mine_block_without_rollback.rs
@@ -4,7 +4,7 @@ use azalea_protocol::packets::{
ConnectionProtocol,
game::{ClientboundBlockChangedAck, ClientboundBlockUpdate},
};
-use azalea_registry::Block;
+use azalea_registry::builtin::BlockKind;
#[test]
fn test_mine_block_without_rollback() {
@@ -21,10 +21,10 @@ fn test_mine_block_without_rollback() {
pos,
// tnt is used for this test because it's insta-mineable so we don't have to waste ticks
// waiting
- block_state: Block::Tnt.into(),
+ block_state: BlockKind::Tnt.into(),
});
simulation.tick();
- assert_eq!(simulation.get_block_state(pos), Some(Block::Tnt.into()));
+ assert_eq!(simulation.get_block_state(pos), Some(BlockKind::Tnt.into()));
simulation.write_message(StartMiningBlockEvent {
entity: simulation.entity,
@@ -32,15 +32,15 @@ fn test_mine_block_without_rollback() {
force: true,
});
simulation.tick();
- assert_eq!(simulation.get_block_state(pos), Some(Block::Air.into()));
+ assert_eq!(simulation.get_block_state(pos), Some(BlockKind::Air.into()));
// server acknowledged our change by sending a BlockUpdate + BlockChangedAck, so
// no rollback
simulation.receive_packet(ClientboundBlockUpdate {
pos,
- block_state: Block::Air.into(),
+ block_state: BlockKind::Air.into(),
});
simulation.receive_packet(ClientboundBlockChangedAck { seq: 1 });
simulation.tick();
- assert_eq!(simulation.get_block_state(pos), Some(Block::Air.into()));
+ assert_eq!(simulation.get_block_state(pos), Some(BlockKind::Air.into()));
}
diff --git a/azalea-client/tests/move_and_despawn_entity.rs b/azalea-client/tests/move_and_despawn_entity.rs
index c05c3f0e..8a143243 100644
--- a/azalea-client/tests/move_and_despawn_entity.rs
+++ b/azalea-client/tests/move_and_despawn_entity.rs
@@ -7,7 +7,7 @@ use azalea_protocol::{
game::{ClientboundRemoveEntities, ClientboundTeleportEntity},
},
};
-use azalea_registry::EntityKind;
+use azalea_registry::builtin::EntityKind;
use azalea_world::MinecraftEntityId;
#[test]
diff --git a/azalea-client/tests/move_despawned_entity.rs b/azalea-client/tests/move_despawned_entity.rs
index 8407bfe1..dad2a710 100644
--- a/azalea-client/tests/move_despawned_entity.rs
+++ b/azalea-client/tests/move_despawned_entity.rs
@@ -2,7 +2,7 @@ use azalea_client::test_utils::prelude::*;
use azalea_core::position::ChunkPos;
use azalea_entity::metadata::Cow;
use azalea_protocol::packets::{ConnectionProtocol, game::ClientboundMoveEntityRot};
-use azalea_registry::EntityKind;
+use azalea_registry::builtin::EntityKind;
use azalea_world::MinecraftEntityId;
use bevy_ecs::query::With;
use tracing::Level;
diff --git a/azalea-client/tests/packet_order.rs b/azalea-client/tests/packet_order.rs
index 90496292..619ed0b6 100644
--- a/azalea-client/tests/packet_order.rs
+++ b/azalea-client/tests/packet_order.rs
@@ -11,7 +11,7 @@ use azalea_protocol::{
},
},
};
-use azalea_registry::Block;
+use azalea_registry::builtin::BlockKind;
#[test]
fn test_packet_order() {
@@ -30,7 +30,7 @@ fn test_packet_order() {
simulation.receive_packet(make_basic_empty_chunk(ChunkPos::new(0, 0), (384 + 64) / 16));
simulation.receive_packet(ClientboundBlockUpdate {
pos: BlockPos::new(1, 1, 3),
- block_state: Block::Stone.into(),
+ block_state: BlockKind::Stone.into(),
});
simulation.receive_packet(ClientboundPlayerPosition {
id: 1,
@@ -44,7 +44,7 @@ fn test_packet_order() {
simulation.tick();
assert_eq!(
simulation.get_block_state(BlockPos::new(1, 1, 3)),
- Some(Block::Stone.into())
+ Some(BlockKind::Stone.into())
);
sent_packets.expect("AcceptTeleportation", |p| {
matches!(
diff --git a/azalea-client/tests/packet_order_set_carried_item.rs b/azalea-client/tests/packet_order_set_carried_item.rs
index a357dec0..e8ac386f 100644
--- a/azalea-client/tests/packet_order_set_carried_item.rs
+++ b/azalea-client/tests/packet_order_set_carried_item.rs
@@ -17,7 +17,7 @@ use azalea_protocol::{
},
},
};
-use azalea_registry::Block;
+use azalea_registry::builtin::BlockKind;
#[test]
fn test_packet_order_set_carried_item() {
@@ -33,7 +33,7 @@ fn test_packet_order_set_carried_item() {
let pos = BlockPos::new(0, 2, 0);
simulation.receive_packet(ClientboundBlockUpdate {
pos,
- block_state: Block::Stone.into(),
+ block_state: BlockKind::Stone.into(),
});
simulation.receive_packet(ClientboundPlayerPosition {
id: 1,
@@ -45,7 +45,10 @@ fn test_packet_order_set_carried_item() {
relative: RelativeMovements::all_absolute(),
});
simulation.tick();
- assert_eq!(simulation.get_block_state(pos), Some(Block::Stone.into()));
+ assert_eq!(
+ simulation.get_block_state(pos),
+ Some(BlockKind::Stone.into())
+ );
simulation.with_component_mut::<LookDirection>(|look| {
// look down
look.update_x_rot(90.);
diff --git a/azalea-client/tests/receive_spawn_entity_and_start_config_packet.rs b/azalea-client/tests/receive_spawn_entity_and_start_config_packet.rs
index 8fa3d925..dfb1fef9 100644
--- a/azalea-client/tests/receive_spawn_entity_and_start_config_packet.rs
+++ b/azalea-client/tests/receive_spawn_entity_and_start_config_packet.rs
@@ -4,7 +4,7 @@ use azalea_protocol::packets::{
ConnectionProtocol,
game::{ClientboundAddEntity, ClientboundStartConfiguration},
};
-use azalea_registry::EntityKind;
+use azalea_registry::builtin::EntityKind;
use azalea_world::InstanceName;
use uuid::Uuid;
diff --git a/azalea-client/tests/reply_to_ping_with_pong.rs b/azalea-client/tests/reply_to_ping_with_pong.rs
index ff369a1d..6b7cb4ca 100644
--- a/azalea-client/tests/reply_to_ping_with_pong.rs
+++ b/azalea-client/tests/reply_to_ping_with_pong.rs
@@ -4,7 +4,6 @@ use azalea_client::{
packet::{config::SendConfigPacketEvent, game::SendGamePacketEvent},
test_utils::prelude::*,
};
-use azalea_core::identifier::Identifier;
use azalea_protocol::packets::{
ConnectionProtocol,
config::{
@@ -12,6 +11,7 @@ use azalea_protocol::packets::{
},
game::{self, ServerboundGamePacket},
};
+use azalea_registry::identifier::Identifier;
use bevy_ecs::observer::On;
use parking_lot::Mutex;
use simdnbt::owned::{NbtCompound, NbtTag};
diff --git a/azalea-client/tests/set_health_before_login.rs b/azalea-client/tests/set_health_before_login.rs
index 5b2dfc8e..4c1ec3f6 100644
--- a/azalea-client/tests/set_health_before_login.rs
+++ b/azalea-client/tests/set_health_before_login.rs
@@ -1,11 +1,11 @@
use azalea_client::{InConfigState, test_utils::prelude::*};
-use azalea_core::identifier::Identifier;
use azalea_entity::{LocalEntity, metadata::Health};
use azalea_protocol::packets::{
ConnectionProtocol,
config::{ClientboundFinishConfiguration, ClientboundRegistryData},
game::ClientboundSetHealth,
};
+use azalea_registry::identifier::Identifier;
use simdnbt::owned::{NbtCompound, NbtTag};
#[test]
diff --git a/azalea-client/tests/teleport_movement.rs b/azalea-client/tests/teleport_movement.rs
index 48fc11d5..03df5b92 100644
--- a/azalea-client/tests/teleport_movement.rs
+++ b/azalea-client/tests/teleport_movement.rs
@@ -15,7 +15,7 @@ use azalea_protocol::{
},
},
};
-use azalea_registry::Block;
+use azalea_registry::builtin::BlockKind;
use azalea_world::MinecraftEntityId;
#[test]
@@ -39,7 +39,7 @@ fn test_teleport_movement() {
));
simulation.receive_packet(ClientboundBlockUpdate {
pos: BlockPos::new(31, 63, 370),
- block_state: Block::Stone.into(),
+ block_state: BlockKind::Stone.into(),
});
simulation.receive_packet(ClientboundPlayerPosition {
id: 1,