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-client/src/plugins/packet/game/events.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'azalea-client/src/plugins/packet/game/events.rs') diff --git a/azalea-client/src/plugins/packet/game/events.rs b/azalea-client/src/plugins/packet/game/events.rs index 535bd519..bc070ec8 100644 --- a/azalea-client/src/plugins/packet/game/events.rs +++ b/azalea-client/src/plugins/packet/game/events.rs @@ -5,8 +5,7 @@ use azalea_protocol::packets::{ Packet, game::{ClientboundGamePacket, ClientboundPlayerCombatKill, ServerboundGamePacket}, }; -use azalea_registry::identifier::Identifier; -use azalea_world::Instance; +use azalea_world::{World, WorldName}; use bevy_ecs::prelude::*; use parking_lot::RwLock; use tracing::{error, trace}; @@ -138,16 +137,18 @@ pub struct ResourcePackEvent { pub prompt: Option, } -/// An instance (aka world, dimension) was loaded by a client. +/// A world instance (aka dimension) was loaded by a client. /// -/// Since the instance is given to you as a weak reference, it won't be able to -/// be `upgrade`d if all local players leave it. +/// Since the world is given to you as a weak reference, it won't be able to be +/// `upgrade`d if all local players unload it. #[derive(Clone, Debug, Message)] -pub struct InstanceLoadedEvent { +pub struct WorldLoadedEvent { pub entity: Entity, - pub name: Identifier, - pub instance: Weak>, + pub name: WorldName, + pub world: Weak>, } +#[deprecated = "renamed to `WorldLoadedEvent`."] +pub type InstanceLoadedEvent = WorldLoadedEvent; /// A Bevy trigger that's sent when our client receives a [`ClientboundPing`] /// packet in the game state. -- cgit v1.2.3