From b1b40fef16a17f4a6da7d4268af8f0921dbe829c Mon Sep 17 00:00:00 2001 From: Paramat Date: Sat, 18 May 2019 21:13:14 +0100 Subject: Allow multiple cave liquids in a biome definition (#8481) This allows games to specify biome cave liquids and avoid the old hardcoded behaviour, but preserves the ability to have multiple cave liquids in one biome, such as lava and water. When multiple cave liquids are defined by the biome definition, make each entire cave use a randomly chosen liquid, instead of every small cave segment using a randomly chosen liquid. Plus an optimisation: Don't place nodes if cave liquid is defined as 'air' --- src/mapgen/cavegen.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mapgen/cavegen.h') diff --git a/src/mapgen/cavegen.h b/src/mapgen/cavegen.h index 7b7be6219..f5234a671 100644 --- a/src/mapgen/cavegen.h +++ b/src/mapgen/cavegen.h @@ -133,6 +133,7 @@ public: bool large_cave; bool large_cave_is_flat; bool flooded; + bool use_biome_liquid; v3s16 node_min; v3s16 node_max; @@ -150,6 +151,7 @@ public: content_t c_water_source; content_t c_lava_source; + content_t c_biome_liquid; // ndef is a mandatory parameter. // If gennotify is NULL, generation events are not logged. -- cgit v1.2.3