diff --git a/src/world/generator/WorldGenerator.cpp b/src/world/generator/WorldGenerator.cpp index 8acc76e1..f585e71b 100644 --- a/src/world/generator/WorldGenerator.cpp +++ b/src/world/generator/WorldGenerator.cpp @@ -449,14 +449,17 @@ void WorldGenerator::generate(voxel* voxels, int chunkX, int chunkZ) { generatePlacements(prototype, voxels, chunkX, chunkZ); generatePlants(prototype, values, voxels, chunkX, chunkZ, biomes); -#ifndef NDEBUG for (uint i = 0; i < CHUNK_VOL; i++) { - blockid_t id = voxels[i].id; + blockid_t& id = voxels[i].id; + if (id == BLOCK_STRUCT_AIR) { + id = BLOCK_AIR; + } +#ifndef NDEBUG if (indices.get(id) == nullptr) { abort(); } - } #endif + } } void WorldGenerator::generatePlacements( @@ -514,11 +517,7 @@ void WorldGenerator::generateStructure( const auto& structVoxel = structVoxels[vox_index(x, y, z, size.x, size.z)]; if (structVoxel.id) { - if (structVoxel.id == BLOCK_STRUCT_AIR) { - voxels[vox_index(sx, sy, sz)] = {0, {}}; - } else { - voxels[vox_index(sx, sy, sz)] = structVoxel; - } + voxels[vox_index(sx, sy, sz)] = structVoxel; } } }