aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-12-12 09:05:17 -0300
committermat <git@matdoes.dev>2025-12-12 09:05:17 -0300
commitb6e2e14e67c71a7b8473ea56e3caaf33fd50905d (patch)
tree7c83461a78d086920cebb2002ae8429f752d5a60 /azalea-world/src
parentca70e5e321a3c174c53d0650feed84db471ac30d (diff)
downloadazalea-drasl-b6e2e14e67c71a7b8473ea56e3caaf33fd50905d.tar.xz
move update_fluid_on_eyes from Update to GameTick
Diffstat (limited to 'azalea-world/src')
-rw-r--r--azalea-world/src/container.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/azalea-world/src/container.rs b/azalea-world/src/container.rs
index 3e167085..c2788198 100644
--- a/azalea-world/src/container.rs
+++ b/azalea-world/src/container.rs
@@ -40,8 +40,9 @@ impl InstanceContainer {
InstanceContainer::default()
}
- /// Get a world from the container. Returns `None` if none of the clients
- /// are in this world.
+ /// Get an instance (aka world) from the container.
+ ///
+ /// Returns `None` if none of the clients are in this instance.
pub fn get(&self, name: &InstanceName) -> Option<Arc<RwLock<Instance>>> {
self.instances.get(name).and_then(|world| world.upgrade())
}
@@ -92,6 +93,6 @@ impl InstanceContainer {
///
/// If two entities share the same instance name, we assume they're in the
/// same instance.
-#[derive(Component, Clone, Debug, PartialEq, Deref, DerefMut)]
+#[derive(Component, Clone, Debug, PartialEq, Deref, DerefMut, Hash, Eq)]
#[doc(alias("worldname", "world name"))]
pub struct InstanceName(pub Identifier);