From 856a3252f693421df519cbc4d9bc03cfc0f0c212 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 17 Sep 2023 21:44:17 -0500 Subject: heightmaps --- azalea-core/src/position.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'azalea-core/src/position.rs') diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index eb6bcd89..f8072fa4 100755 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -346,6 +346,17 @@ impl From for ChunkPos { } } +impl From<&Vec3> for ChunkBlockPos { + fn from(pos: &Vec3) -> Self { + ChunkBlockPos::from(&BlockPos::from(pos)) + } +} +impl From for ChunkBlockPos { + fn from(pos: Vec3) -> Self { + ChunkBlockPos::from(&pos) + } +} + const PACKED_X_LENGTH: u64 = 1 + 25; // minecraft does something a bit more complicated to get this 25 const PACKED_Z_LENGTH: u64 = PACKED_X_LENGTH; const PACKED_Y_LENGTH: u64 = 64 - PACKED_X_LENGTH - PACKED_Z_LENGTH; -- cgit v1.2.3