From 53fca5faf4878c7afcd65f1eb0811c2b8e02a214 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 21 Jan 2025 23:53:11 +0000 Subject: fix errors when switching worlds --- azalea-world/src/container.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'azalea-world/src') diff --git a/azalea-world/src/container.rs b/azalea-world/src/container.rs index 7e5927e3..9fa5d7f9 100644 --- a/azalea-world/src/container.rs +++ b/azalea-world/src/container.rs @@ -9,7 +9,7 @@ use derive_more::{Deref, DerefMut}; use nohash_hasher::IntMap; use parking_lot::RwLock; use rustc_hash::FxHashMap; -use tracing::error; +use tracing::{debug, error}; use crate::{ChunkStorage, Instance}; @@ -43,7 +43,7 @@ impl InstanceContainer { self.instances.get(name).and_then(|world| world.upgrade()) } - /// Add an empty world to the container (or not if it already exists) and + /// Add an empty world to the container (unless it already exists) and /// returns a strong reference to the world. #[must_use = "the world will be immediately forgotten if unused"] pub fn insert( @@ -74,6 +74,7 @@ impl InstanceContainer { entity_by_id: IntMap::default(), registries: RegistryHolder::default(), })); + debug!("Added new instance {name}"); self.instances.insert(name, Arc::downgrade(&world)); world } -- cgit v1.2.3