diff options
| author | mat <github@matdoes.dev> | 2023-05-04 20:38:10 +0000 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2023-05-04 20:38:10 +0000 |
| commit | c7a923ccc8ae825deca62ac2cc8c80c01484d5b6 (patch) | |
| tree | 787c6eb579d0b126f0e9dfa161bdea758fe9aa0a /azalea-world/src/container.rs | |
| parent | ff6d43458cef8ac6a23e6e8accd4b71c2a04aef6 (diff) | |
| parent | 634cb8d72c6608512aedba19e5cd669104bc35ea (diff) | |
| download | azalea-drasl-c7a923ccc8ae825deca62ac2cc8c80c01484d5b6.tar.xz | |
merge main
Diffstat (limited to 'azalea-world/src/container.rs')
| -rw-r--r-- | azalea-world/src/container.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-world/src/container.rs b/azalea-world/src/container.rs index c8af8c99..2cf8da8e 100644 --- a/azalea-world/src/container.rs +++ b/azalea-world/src/container.rs @@ -8,7 +8,7 @@ use std::{ sync::{Arc, Weak}, }; -use crate::{ChunkStorage, Instance}; +use crate::{entity::WorldName, ChunkStorage, Instance}; /// A container of [`Instance`]s (aka worlds). Instances are stored as a Weak /// pointer here, so if no clients are using an instance it will be forgotten. @@ -37,7 +37,7 @@ impl InstanceContainer { } /// Get a world from the container. - pub fn get(&self, name: &ResourceLocation) -> Option<Arc<RwLock<Instance>>> { + pub fn get(&self, name: &WorldName) -> Option<Arc<RwLock<Instance>>> { self.worlds.get(name).and_then(|world| world.upgrade()) } |
