summaryrefslogtreecommitdiff
path: root/src/cavegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cavegen.cpp')
-rw-r--r--src/cavegen.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cavegen.cpp b/src/cavegen.cpp
index 51af50984..71f005d5b 100644
--- a/src/cavegen.cpp
+++ b/src/cavegen.cpp
@@ -236,6 +236,9 @@ void CaveV6::carveRoute(v3f vec, float f, bool randomize_xz) {
continue;
u32 i = vm->m_area.index(p);
+ content_t c = vm->m_data[i].getContent();
+ if (!ndef->get(c).is_ground_content)
+ continue;
if (large_cave) {
int full_ymin = node_min.Y - MAP_BLOCKSIZE;
@@ -250,7 +253,6 @@ void CaveV6::carveRoute(v3f vec, float f, bool randomize_xz) {
}
} else {
// Don't replace air or water or lava or ignore
- content_t c = vm->m_data[i].getContent();
if (c == CONTENT_IGNORE || c == CONTENT_AIR ||
c == c_water_source || c == c_lava_source)
continue;
@@ -530,8 +532,8 @@ void CaveV7::carveRoute(v3f vec, float f, bool randomize_xz, bool is_ravine) {
// Don't replace air, water, lava, or ice
content_t c = vm->m_data[i].getContent();
- if (c == CONTENT_AIR || c == c_water_source ||
- c == c_lava_source || c == c_ice)
+ if (!ndef->get(c).is_ground_content || c == CONTENT_AIR ||
+ c == c_water_source || c == c_lava_source || c == c_ice)
continue;
if (large_cave) {