mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
block inventories (backend)
This commit is contained in:
parent
fe57c38edf
commit
87f50f79c9
12 changed files with 108 additions and 18 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue