diff options
| author | mat <github@matdoes.dev> | 2022-05-03 00:33:32 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-03 00:33:32 -0500 |
| commit | 0bd798045c4328208667df37348e9affb37e384f (patch) | |
| tree | 241fbc2b738b2a47cd6220bb07beb450c7359ab4 /azalea-core/src/position.rs | |
| parent | 8e42e1c5dfc54314585b564696044780e0407c2f (diff) | |
| download | azalea-drasl-0bd798045c4328208667df37348e9affb37e384f.tar.xz | |
more azalea-world stuff
Diffstat (limited to 'azalea-core/src/position.rs')
| -rw-r--r-- | azalea-core/src/position.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs new file mode 100644 index 00000000..aa82c1f9 --- /dev/null +++ b/azalea-core/src/position.rs @@ -0,0 +1,24 @@ +#[derive(Clone, Copy, Debug, Default)] +pub struct BlockPos { + pub x: i32, + pub y: i32, + pub z: i32, +} + +impl BlockPos { + pub fn new(x: i32, y: i32, z: i32) -> Self { + BlockPos { x, y, z } + } +} + +#[derive(Clone, Copy, Debug, Default)] +pub struct ChunkPos { + pub x: i32, + pub z: i32, +} + +impl ChunkPos { + pub fn new(x: i32, z: i32) -> Self { + ChunkPos { x, z } + } +} |
