add core:struct_air

This commit is contained in:
MihailRis
2024-10-04 01:53:17 +03:00
parent 0cbc048523
commit a47b650591
5 changed files with 28 additions and 5 deletions
+5 -1
View File
@@ -348,7 +348,11 @@ void WorldGenerator::generate(voxel* voxels, int chunkX, int chunkZ) {
const auto& structVoxel =
structVoxels[vox_index(x, y, z, size.x, size.z)];
if (structVoxel.id) {
voxels[vox_index(sx, sy, sz)] = structVoxel;
if (structVoxel.id == BLOCK_STRUCT_AIR) {
voxels[vox_index(sx, sy, sz)] = {0, {}};
} else {
voxels[vox_index(sx, sy, sz)] = structVoxel;
}
}
}
}