1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Biome API / cavegen: Add definable cave liquid for a biome (#7192)

Add 'node_cave_liquid' as a new field in biome registration.
If field is absent cave liquids fall back to classic behaviour.
This commit is contained in:
Paramat 2018-04-05 17:21:41 +01:00 committed by GitHub
parent 077f231111
commit 32d456bd2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 40 additions and 12 deletions

View file

@ -858,9 +858,10 @@ void MapgenBasic::generateCaves(s16 max_stone_y, s16 large_cave_depth)
u32 bruises_count = ps.range(0, 2);
for (u32 i = 0; i < bruises_count; i++) {
CavesRandomWalk cave(ndef, &gennotify, seed, water_level,
c_water_source, CONTENT_IGNORE, lava_depth);
c_water_source, c_lava_source, lava_depth, biomegen);
cave.makeCave(vm, node_min, node_max, &ps, true, max_stone_y, heightmap);
cave.makeCave(vm, node_min, node_max, &ps, true, max_stone_y,
heightmap);
}
}