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

implement chests

This commit is contained in:
p2r3
2025-08-28 23:51:00 +03:00
parent 1ae481ed3d
commit ca6f8afbea
7 changed files with 173 additions and 20 deletions

View File

@@ -380,7 +380,11 @@ uint8_t buildChunkSection (int cx, int cy, int cz) {
// runs per block, as this is more expensive than terrain generation.
for (int i = 0; i < block_changes_count; i ++) {
if (block_changes[i].block == 0xFF) continue;
// Skip blocks that behave better when sent using a block update
if (block_changes[i].block == B_torch) continue;
#ifdef ALLOW_CHESTS
if (block_changes[i].block == B_chest) continue;
#endif
if ( // Check if block is within this chunk section
block_changes[i].x >= cx && block_changes[i].x < cx + 16 &&
block_changes[i].y >= cy && block_changes[i].y < cy + 16 &&