From cee64cece3ddbe4c0a41f0761d69b7c490d85040 Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 2 Jun 2025 15:55:39 -0300 Subject: actually send Event::ReceiveChunk --- azalea-core/src/position.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'azalea-core/src') diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index 5932cb5b..357e9b39 100644 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -444,6 +444,17 @@ impl Add for ChunkPos { } } } +impl Add for ChunkPos { + type Output = BlockPos; + + fn add(self, rhs: ChunkBlockPos) -> Self::Output { + BlockPos { + x: self.x * 16 + rhs.x as i32, + y: rhs.y, + z: self.z * 16 + rhs.z as i32, + } + } +} // reading ChunkPos is done in reverse, so z first and then x // ........ -- cgit v1.2.3