aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2023-02-05 14:31:52 -0600
committermat <github@matdoes.dev>2023-02-05 14:31:52 -0600
commit0d3a091c232d409939db82dfb30f700e57583c85 (patch)
tree592c3734d824fb2a5cc25d07a997c98239b7d99c /azalea-world/src
parenta72b76839782b26e49598313bb04c5d322a34788 (diff)
downloadazalea-drasl-0d3a091c232d409939db82dfb30f700e57583c85.tar.xz
improve docs
Diffstat (limited to 'azalea-world/src')
-rw-r--r--azalea-world/src/entity/attributes.rs2
-rwxr-xr-xazalea-world/src/entity/data.rs1
-rw-r--r--azalea-world/src/entity/mod.rs2
-rw-r--r--azalea-world/src/entity_info.rs31
4 files changed, 3 insertions, 33 deletions
diff --git a/azalea-world/src/entity/attributes.rs b/azalea-world/src/entity/attributes.rs
index fd78a328..6b10a2b4 100644
--- a/azalea-world/src/entity/attributes.rs
+++ b/azalea-world/src/entity/attributes.rs
@@ -1,4 +1,4 @@
-//! <https://minecraft.fandom.com/wiki/Attribute>
+//! See <https://minecraft.fandom.com/wiki/Attribute>.
use std::{
collections::HashMap,
diff --git a/azalea-world/src/entity/data.rs b/azalea-world/src/entity/data.rs
index 14d257e3..346b277b 100755
--- a/azalea-world/src/entity/data.rs
+++ b/azalea-world/src/entity/data.rs
@@ -103,6 +103,7 @@ impl McBufWritable for OptionalUnsignedInt {
}
}
+/// A set of x, y, and z rotations. This is used for armor stands.
#[derive(Clone, Debug, McBuf, Default)]
pub struct Rotations {
pub x: f32,
diff --git a/azalea-world/src/entity/mod.rs b/azalea-world/src/entity/mod.rs
index bf758a12..60a00bfd 100644
--- a/azalea-world/src/entity/mod.rs
+++ b/azalea-world/src/entity/mod.rs
@@ -172,7 +172,7 @@ impl From<&LastSentPosition> for BlockPos {
/// The name of the world the entity is in. If two entities share the same world
/// name, we assume they're in the same world.
#[derive(Component, Clone, Debug, PartialEq, Deref, DerefMut)]
-pub struct WorldName(ResourceLocation);
+pub struct WorldName(pub ResourceLocation);
/// A component for entities that can jump.
///
diff --git a/azalea-world/src/entity_info.rs b/azalea-world/src/entity_info.rs
index 4109e9ce..428336f0 100644
--- a/azalea-world/src/entity_info.rs
+++ b/azalea-world/src/entity_info.rs
@@ -324,34 +324,3 @@ impl Debug for EntityInfos {
f.debug_struct("EntityInfos").finish()
}
}
-
-// #[cfg(test)]
-// mod tests {
-// use crate::entity::metadata;
-
-// use super::*;
-// use azalea_core::Vec3;
-
-// #[test]
-// fn test_store_entity() {
-// let mut storage = PartialEntityInfos::default();
-// assert!(storage.limited_get_by_id(0).is_none());
-// assert!(storage.shared.read().get_by_id(0).is_none());
-
-// let uuid = Uuid::from_u128(100);
-// storage.insert(
-// 0,
-// EntityData::new(
-// uuid,
-// Vec3::default(),
-// EntityMetadata::Player(metadata::Player::default()),
-// ),
-// );
-// assert_eq!(storage.limited_get_by_id(0).unwrap().uuid, uuid);
-// assert_eq!(storage.shared.read().get_by_id(0).unwrap().uuid, uuid);
-
-// storage.remove_by_id(0);
-// assert!(storage.limited_get_by_id(0).is_none());
-// assert!(storage.shared.read().get_by_id(0).is_none());
-// }
-// }