From d5fa5e32b37754b3b5c136e58821e48cd3b7c2ff Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 13 Jan 2026 10:51:30 -0600 Subject: Rename Instance to World (#304) --- azalea-protocol/Cargo.toml | 8 +++++++- azalea-protocol/src/packets/game/c_add_entity.rs | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'azalea-protocol') diff --git a/azalea-protocol/Cargo.toml b/azalea-protocol/Cargo.toml index c7b0fd57..193e153e 100644 --- a/azalea-protocol/Cargo.toml +++ b/azalea-protocol/Cargo.toml @@ -23,6 +23,7 @@ azalea-entity = { workspace = true } azalea-inventory.workspace = true azalea-protocol-macros.workspace = true azalea-registry.workspace = true +azalea-world = { workspace = true, optional = true } bevy_ecs = { workspace = true, optional = true } # byteorder.workspace = true flate2.workspace = true @@ -46,7 +47,12 @@ reqwest = { workspace = true, optional = true, features = ["socks"] } default = ["online-mode", "connecting"] connecting = [] online-mode = ["azalea-auth/online-mode", "dep:reqwest"] -bevy_ecs = ["dep:bevy_ecs", "azalea-entity/bevy_ecs", "azalea-core/bevy_ecs"] +bevy_ecs = [ + "dep:bevy_ecs", + "dep:azalea-world", + "azalea-entity/bevy_ecs", + "azalea-core/bevy_ecs", +] [lints] workspace = true diff --git a/azalea-protocol/src/packets/game/c_add_entity.rs b/azalea-protocol/src/packets/game/c_add_entity.rs index 19f229ee..1b94baef 100644 --- a/azalea-protocol/src/packets/game/c_add_entity.rs +++ b/azalea-protocol/src/packets/game/c_add_entity.rs @@ -3,7 +3,7 @@ use azalea_core::{delta::LpVec3, entity_id::MinecraftEntityId, position::Vec3}; use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::builtin::EntityKind; #[cfg(feature = "bevy_ecs")] -use azalea_registry::identifier::Identifier; +use azalea_world::WorldName; use uuid::Uuid; #[derive(AzBuf, ClientboundGamePacket, Clone, Debug, PartialEq)] @@ -36,7 +36,7 @@ impl ClientboundAddEntity { /// You must apply the metadata after inserting the bundle with /// [`Self::apply_metadata`]. #[cfg(feature = "bevy_ecs")] - pub fn as_entity_bundle(&self, world_name: Identifier) -> azalea_entity::EntityBundle { + pub fn as_entity_bundle(&self, world_name: WorldName) -> azalea_entity::EntityBundle { azalea_entity::EntityBundle::new(self.uuid, self.position, self.entity_type, world_name) } -- cgit v1.2.3