diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2026-01-13 10:51:30 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-13 10:51:30 -0600 |
| commit | d5fa5e32b37754b3b5c136e58821e48cd3b7c2ff (patch) | |
| tree | ea04702f96ad170fb1d90e5ed2dc875ae8166495 /azalea-client/src/plugins/packet/game/events.rs | |
| parent | efb36d5fc0fe56a98f5795c53dfa109887cd5aae (diff) | |
| download | azalea-drasl-d5fa5e32b37754b3b5c136e58821e48cd3b7c2ff.tar.xz | |
Rename Instance to World (#304)
Diffstat (limited to 'azalea-client/src/plugins/packet/game/events.rs')
| -rw-r--r-- | azalea-client/src/plugins/packet/game/events.rs | 17 |
1 files changed, 9 insertions, 8 deletions
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<FormattedText>, } -/// 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<RwLock<Instance>>, + pub name: WorldName, + pub world: Weak<RwLock<World>>, } +#[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. |
