aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-client/src')
-rw-r--r--azalea-client/src/client.rs7
-rw-r--r--azalea-client/src/plugins/packet/game/events.rs4
-rw-r--r--azalea-client/src/test_utils/simulation.rs12
3 files changed, 11 insertions, 12 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs
index 6957619e..e0902779 100644
--- a/azalea-client/src/client.rs
+++ b/azalea-client/src/client.rs
@@ -10,8 +10,7 @@ use std::{
use azalea_auth::game_profile::GameProfile;
use azalea_core::{
- data_registry::ResolvableDataRegistry, position::Vec3, resource_location::ResourceLocation,
- tick::GameTick,
+ data_registry::ResolvableDataRegistry, identifier::Identifier, position::Vec3, tick::GameTick,
};
use azalea_entity::{
EntityUpdateSystems, PlayerAbilities, Position,
@@ -487,7 +486,7 @@ impl Client {
pub fn resolve_registry_name(
&self,
registry: &impl ResolvableDataRegistry,
- ) -> Option<ResourceLocation> {
+ ) -> Option<Identifier> {
self.with_registry_holder(|registries| registry.resolve_name(registries))
}
/// Resolve the given registry to its name and data and call the given
@@ -502,7 +501,7 @@ impl Client {
pub fn with_resolved_registry<R>(
&self,
registry: impl ResolvableDataRegistry,
- f: impl FnOnce(&ResourceLocation, &NbtCompound) -> R,
+ f: impl FnOnce(&Identifier, &NbtCompound) -> R,
) -> Option<R> {
self.with_registry_holder(|registries| {
registry
diff --git a/azalea-client/src/plugins/packet/game/events.rs b/azalea-client/src/plugins/packet/game/events.rs
index 7c773b44..53d93855 100644
--- a/azalea-client/src/plugins/packet/game/events.rs
+++ b/azalea-client/src/plugins/packet/game/events.rs
@@ -1,7 +1,7 @@
use std::sync::{Arc, Weak};
use azalea_chat::FormattedText;
-use azalea_core::resource_location::ResourceLocation;
+use azalea_core::identifier::Identifier;
use azalea_protocol::packets::{
Packet,
game::{ClientboundGamePacket, ClientboundPlayerCombatKill, ServerboundGamePacket},
@@ -145,7 +145,7 @@ pub struct ResourcePackEvent {
#[derive(Message, Debug, Clone)]
pub struct InstanceLoadedEvent {
pub entity: Entity,
- pub name: ResourceLocation,
+ pub name: Identifier,
pub instance: Weak<RwLock<Instance>>,
}
diff --git a/azalea-client/src/test_utils/simulation.rs b/azalea-client/src/test_utils/simulation.rs
index 8d52177a..13470600 100644
--- a/azalea-client/src/test_utils/simulation.rs
+++ b/azalea-client/src/test_utils/simulation.rs
@@ -6,8 +6,8 @@ use azalea_buf::AzaleaWrite;
use azalea_core::{
delta::LpVec3,
game_type::{GameMode, OptionalGameType},
+ identifier::Identifier,
position::{BlockPos, ChunkPos, Vec3},
- resource_location::ResourceLocation,
tick::GameTick,
};
use azalea_entity::metadata::PlayerMetadataBundle;
@@ -76,9 +76,9 @@ impl Simulation {
ConnectionProtocol::Configuration => {}
ConnectionProtocol::Game => {
simulation.receive_packet(ClientboundRegistryData {
- registry_id: ResourceLocation::new("minecraft:dimension_type"),
+ registry_id: Identifier::new("minecraft:dimension_type"),
entries: vec![(
- ResourceLocation::new("minecraft:overworld"),
+ Identifier::new("minecraft:overworld"),
Some(NbtCompound::from_values(vec![
("height".into(), NbtTag::Int(384)),
("min_y".into(), NbtTag::Int(-64)),
@@ -302,13 +302,13 @@ fn tick_app(app: &mut App) {
pub fn default_login_packet() -> ClientboundLogin {
make_basic_login_packet(
DimensionType::new_raw(0), // overworld
- ResourceLocation::new("minecraft:overworld"),
+ Identifier::new("minecraft:overworld"),
)
}
pub fn make_basic_login_packet(
dimension_type: DimensionType,
- dimension: ResourceLocation,
+ dimension: Identifier,
) -> ClientboundLogin {
ClientboundLogin {
player_id: MinecraftEntityId(0),
@@ -338,7 +338,7 @@ pub fn make_basic_login_packet(
pub fn make_basic_respawn_packet(
dimension_type: DimensionType,
- dimension: ResourceLocation,
+ dimension: Identifier,
) -> ClientboundRespawn {
ClientboundRespawn {
common: CommonPlayerSpawnInfo {