1
0
mirror of https://github.com/p2r3/bareiron.git synced 2025-10-01 23:25:09 +02:00

send biome data to clients

This commit is contained in:
p2r3
2025-08-20 23:11:07 +03:00
parent 77ea84f6d8
commit e60b5a44f9
3 changed files with 8 additions and 4 deletions

View File

@@ -326,7 +326,9 @@ uint8_t getBlockAt (int x, int y, int z) {
uint8_t chunk_section[4096];
ChunkAnchor chunk_anchors[256 / (CHUNK_SIZE * CHUNK_SIZE)];
void buildChunkSection (int cx, int cy, int cz) {
// Builds a 16x16x16 chunk of blocks and writes it to `chunk_section`
// Returns the biome at the origin corner of the chunk
uint8_t buildChunkSection (int cx, int cy, int cz) {
// Precompute the hashes and anchors for each minichunk
int anchor_index = 0;
@@ -383,4 +385,6 @@ void buildChunkSection (int cx, int cy, int cz) {
}
}
return chunk_anchors[0].biome;
}