diff options
| author | mat <github@matdoes.dev> | 2022-05-05 23:33:08 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-05 23:33:08 -0500 |
| commit | e0239865659b2f2750edda7556548f6a2b8d4127 (patch) | |
| tree | 1a2ddf3499ae37bfed4255bf996fef6fd9f1bc84 /azalea-core/src | |
| parent | 1b48cad53ffba45463be41dafb4dfbcab0f46c09 (diff) | |
| download | azalea-drasl-e0239865659b2f2750edda7556548f6a2b8d4127.tar.xz | |
random polish
Diffstat (limited to 'azalea-core/src')
| -rwxr-xr-x | azalea-core/src/lib.rs | 2 | ||||
| -rw-r--r-- | azalea-core/src/position.rs | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/azalea-core/src/lib.rs b/azalea-core/src/lib.rs index 6f0c25cc..0053dc9b 100755 --- a/azalea-core/src/lib.rs +++ b/azalea-core/src/lib.rs @@ -9,7 +9,7 @@ mod slot; pub use slot::{Slot, SlotData}; mod position; -pub use position::{BlockPos, ChunkPos}; +pub use position::{BlockPos, ChunkPos, ChunkSectionPos}; mod direction; pub use direction::Direction; diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index aa82c1f9..a57f5c0b 100644 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -22,3 +22,16 @@ impl ChunkPos { ChunkPos { x, z } } } + +#[derive(Clone, Copy, Debug, Default)] +pub struct ChunkSectionPos { + pub x: i32, + pub y: i32, + pub z: i32, +} + +impl ChunkSectionPos { + pub fn new(x: i32, y: i32, z: i32) -> Self { + ChunkSectionPos { x, y, z } + } +} |
