diff options
Diffstat (limited to '')
-rw-r--r-- | src/mapgen_fractal.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mapgen_fractal.cpp b/src/mapgen_fractal.cpp index 8a5c1e2bc..cdea9c09a 100644 --- a/src/mapgen_fractal.cpp +++ b/src/mapgen_fractal.cpp @@ -701,6 +701,12 @@ void MapgenFractal::generateCaves(s16 max_stone_y) for (s16 y = node_max.Y + 1; y >= node_min.Y - 1; y--, index3d -= ystride, vm->m_area.add_y(em, vi, -1)) { + // Don't excavate the overgenerated stone at node_max.Y + 1, + // this creates a 'roof' over the tunnel, preventing light in + // tunnels at mapchunk borders when generating mapchunks upwards. + if (y > node_max.Y) + continue; + content_t c = vm->m_data[vi].getContent(); if (c == CONTENT_AIR || c == biome->c_water_top || c == biome->c_water) { |