aboutsummaryrefslogtreecommitdiff
path: root/azalea-core
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-core
parenta72b76839782b26e49598313bb04c5d322a34788 (diff)
downloadazalea-drasl-0d3a091c232d409939db82dfb30f700e57583c85.tar.xz
improve docs
Diffstat (limited to 'azalea-core')
-rwxr-xr-xazalea-core/src/position.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs
index d04f58cc..5ba7143e 100755
--- a/azalea-core/src/position.rs
+++ b/azalea-core/src/position.rs
@@ -109,6 +109,8 @@ macro_rules! vec3_impl {
};
}
+/// Used to represent an exact position in the world where an entity could be.
+/// For blocks, [`BlockPos`] is used instead.
#[derive(Clone, Copy, Debug, Default, PartialEq, McBuf)]
pub struct Vec3 {
pub x: f64,
@@ -117,6 +119,8 @@ pub struct Vec3 {
}
vec3_impl!(Vec3, f64);
+/// The coordinates of a block in the world. For entities (if the coordinate
+/// with decimals), use [`Vec3`] instead.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct BlockPos {
pub x: i32,
@@ -137,6 +141,8 @@ impl BlockPos {
}
}
+/// Chunk coordinates are used to represent where a chunk is in the world. You
+/// can convert the x and z to block coordinates by multiplying them by 16.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct ChunkPos {
pub x: i32,