From 0d3a091c232d409939db82dfb30f700e57583c85 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 5 Feb 2023 14:31:52 -0600 Subject: improve docs --- azalea-core/src/position.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'azalea-core/src') 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, -- cgit v1.2.3