block inventories (backend)

This commit is contained in:
MihailRis
2024-02-12 18:28:18 +03:00
parent fe57c38edf
commit 87f50f79c9
12 changed files with 108 additions and 18 deletions
+3
View File
@@ -162,6 +162,9 @@ void Chunks::set(int x, int y, int z, int id, uint8_t states){
int lz = z - cz * CHUNK_D;
voxel& vox = chunk->voxels[(y * CHUNK_D + lz) * CHUNK_W + lx];
auto def = contentIds->getBlockDef(vox.id);
if (def->inventorySize == 0)
chunk->removeBlockInventory(lx, y, lz);
vox.id = id;
vox.states = states;