Added abstraction for coordinates.

These ensure that there aren't any out of bound values
and make the code significantly more readable
This commit is contained in:
DaniD3v committed 2024-08-28 12:38:22 +02:00
1 parent 3b438872a8
commit be98a730b0
7 files changed
+172 -40

No files matched your search

+1 -1
View File
@@ -374,7 +374,7 @@ impl Server {
Err(_) => continue,
};
#[cfg(debug_assertions)]
if _chunk_pos == (0, 0) {
if _chunk_pos == (pumpkin_world::coordinates::ChunkCoordinates { x: 0, z: 0 }) {
use pumpkin_protocol::bytebuf::ByteBuffer;
let mut test = ByteBuffer::empty();
CChunkData(&chunk_data).write(&mut test);