diff options
| author | mat <github@matdoes.dev> | 2023-02-05 14:31:52 -0600 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2023-02-05 14:31:52 -0600 |
| commit | 0d3a091c232d409939db82dfb30f700e57583c85 (patch) | |
| tree | 592c3734d824fb2a5cc25d07a997c98239b7d99c /azalea-core/src/position.rs | |
| parent | a72b76839782b26e49598313bb04c5d322a34788 (diff) | |
| download | azalea-drasl-0d3a091c232d409939db82dfb30f700e57583c85.tar.xz | |
improve docs
Diffstat (limited to 'azalea-core/src/position.rs')
| -rwxr-xr-x | azalea-core/src/position.rs | 6 |
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, |
