aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-06-01 09:57:54 -1245
committermat <git@matdoes.dev>2025-06-01 09:57:54 -1245
commit1d3a7c969f430a8cea4296930df0d6c04e253747 (patch)
treec30eeba985e577fe798b416d4282f9c561d9d537 /azalea-world/src
parentd028d7c3e9c84d177b7b10fa0d8f77d11bcea20f (diff)
downloadazalea-drasl-1d3a7c969f430a8cea4296930df0d6c04e253747.tar.xz
add Client::entities_by and improve some docs
Diffstat (limited to 'azalea-world/src')
-rw-r--r--azalea-world/src/container.rs6
-rw-r--r--azalea-world/src/world.rs8
2 files changed, 11 insertions, 3 deletions
diff --git a/azalea-world/src/container.rs b/azalea-world/src/container.rs
index 53b9c784..bb8ade70 100644
--- a/azalea-world/src/container.rs
+++ b/azalea-world/src/container.rs
@@ -58,7 +58,7 @@ impl InstanceContainer {
let existing = existing_lock.read();
if existing.chunks.height != height {
error!(
- "Shared dimension height mismatch: {} != {height}",
+ "Shared world height mismatch: {} != {height}",
existing.chunks.height
);
}
@@ -86,8 +86,8 @@ impl InstanceContainer {
}
/// The name of the [`Instance`](crate::Instance) (world) the entity is
-/// in. If two entities share the same world name, we assume they're in the same
-/// instance.
+/// in. If two entities share the same instance name, we assume they're in the
+/// same instance.
#[derive(Component, Clone, Debug, PartialEq, Deref, DerefMut)]
#[doc(alias("worldname", "world name"))]
pub struct InstanceName(pub ResourceLocation);
diff --git a/azalea-world/src/world.rs b/azalea-world/src/world.rs
index 00bee13a..47804dcc 100644
--- a/azalea-world/src/world.rs
+++ b/azalea-world/src/world.rs
@@ -144,6 +144,14 @@ impl PartialEntityInfos {
/// A world where the chunks are stored as weak pointers. This is used for
/// shared worlds.
+///
+/// Also see [`PartialInstance`].
+///
+/// The reason this is called "instance" instead of "world" or "dimension" is
+/// because "world" already means the entire ECS (which can contain multiple
+/// instances if we're in a swarm) and "dimension" can be ambiguous (for
+/// instance there can be multiple overworlds, and "dimension" is also a math
+/// term)
#[derive(Default, Debug)]
pub struct Instance {
pub chunks: ChunkStorage,