aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-01-21 23:53:11 +0000
committermat <git@matdoes.dev>2025-01-21 23:53:11 +0000
commit53fca5faf4878c7afcd65f1eb0811c2b8e02a214 (patch)
tree9784b9f5f66f330230e774a7b40f31f4061ddd23 /azalea-world/src
parent900a4234e5b7fbf24a557907bce7c3b7ce30822e (diff)
downloadazalea-drasl-53fca5faf4878c7afcd65f1eb0811c2b8e02a214.tar.xz
fix errors when switching worlds
Diffstat (limited to 'azalea-world/src')
-rw-r--r--azalea-world/src/container.rs5
1 files changed, 3 insertions, 2 deletions
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
}