fix: non-air lines are not placed
This commit is contained in:
parent
6e6f9616cd
commit
6b84fa82fc
@ -560,10 +560,13 @@ void WorldGenerator::generateLine(
|
|||||||
a, b, point
|
a, b, point
|
||||||
);
|
);
|
||||||
if (y > 0 &&
|
if (y > 0 &&
|
||||||
util::distance2(closest, point) <= radius * radius &&
|
util::distance2(closest, point) <= radius * radius
|
||||||
line.block == BLOCK_AIR
|
|
||||||
) {
|
) {
|
||||||
auto& voxel = voxels[vox_index(x, y, z)];
|
auto& voxel = voxels[vox_index(x, y, z)];
|
||||||
|
if (line.block != BLOCK_AIR) {
|
||||||
|
voxel = {line.block, {}};
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!indices.require(voxel.id).replaceable) {
|
if (!indices.require(voxel.id).replaceable) {
|
||||||
voxel = {line.block, {}};
|
voxel = {line.block, {}};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user