fix: non-air lines are not placed

This commit is contained in:
MihailRis 2024-10-19 05:37:10 +03:00
parent 6e6f9616cd
commit 6b84fa82fc

View File

@ -560,10 +560,13 @@ void WorldGenerator::generateLine(
a, b, point
);
if (y > 0 &&
util::distance2(closest, point) <= radius * radius &&
line.block == BLOCK_AIR
util::distance2(closest, point) <= radius * radius
) {
auto& voxel = voxels[vox_index(x, y, z)];
if (line.block != BLOCK_AIR) {
voxel = {line.block, {}};
continue;
}
if (!indices.require(voxel.id).replaceable) {
voxel = {line.block, {}};
}