Skip to content

Commit f21bab2

Browse files
authoredApr 19, 2019
Split underground biome to correspond to surface biomes
In preparation for biome-defined: dungeon materials, cave liquids, stone type, ores, decorations. '_ocean' biomes now extend to y = -255 to be deeper than default mgv5 oceans, and to create 'shallow underground biomes'. Remove unnecessary biome lists for gravel and silver sand blob ores, as those are already defined to only appear in default:stone.
1 parent 0291c6b commit f21bab2

File tree

1 file changed

+105
-34
lines changed

1 file changed

+105
-34
lines changed
 

Diff for: ‎mods/default/mapgen.lua

+105-34
Original file line numberDiff line numberDiff line change
@@ -554,14 +554,6 @@ function default.register_ores()
554554
octaves = 1,
555555
persist = 0.0
556556
},
557-
biomes = {"icesheet_ocean", "tundra", "tundra_beach", "tundra_ocean",
558-
"taiga", "taiga_ocean", "snowy_grassland", "snowy_grassland_ocean",
559-
"grassland", "grassland_dunes", "grassland_ocean", "coniferous_forest",
560-
"coniferous_forest_dunes", "coniferous_forest_ocean", "deciduous_forest",
561-
"deciduous_forest_shore", "deciduous_forest_ocean", "cold_desert",
562-
"cold_desert_ocean", "savanna", "savanna_shore", "savanna_ocean",
563-
"rainforest", "rainforest_swamp", "rainforest_ocean", "underground",
564-
"floatland_coniferous_forest", "floatland_coniferous_forest_ocean"}
565557
})
566558

567559
-- Dirt
@@ -583,6 +575,7 @@ function default.register_ores()
583575
octaves = 1,
584576
persist = 0.0
585577
},
578+
-- Only where default:dirt is present as surface material
586579
biomes = {"taiga", "snowy_grassland", "grassland", "coniferous_forest",
587580
"deciduous_forest", "deciduous_forest_shore", "savanna", "savanna_shore",
588581
"rainforest", "rainforest_swamp", "floatland_coniferous_forest"}
@@ -607,14 +600,6 @@ function default.register_ores()
607600
octaves = 1,
608601
persist = 0.0
609602
},
610-
biomes = {"icesheet_ocean", "tundra", "tundra_beach", "tundra_ocean",
611-
"taiga", "taiga_ocean", "snowy_grassland", "snowy_grassland_ocean",
612-
"grassland", "grassland_dunes", "grassland_ocean", "coniferous_forest",
613-
"coniferous_forest_dunes", "coniferous_forest_ocean", "deciduous_forest",
614-
"deciduous_forest_shore", "deciduous_forest_ocean", "cold_desert",
615-
"cold_desert_ocean", "savanna", "savanna_shore", "savanna_ocean",
616-
"rainforest", "rainforest_swamp", "rainforest_ocean", "underground",
617-
"floatland_coniferous_forest", "floatland_coniferous_forest_ocean"}
618603
})
619604

620605
-- Scatter ores
@@ -940,7 +925,15 @@ function default.register_biomes(upper_limit)
940925
node_water_top = "default:ice",
941926
depth_water_top = 10,
942927
y_max = -9,
943-
y_min = -112,
928+
y_min = -255,
929+
heat_point = 0,
930+
humidity_point = 73,
931+
})
932+
933+
minetest.register_biome({
934+
name = "icesheet_under",
935+
y_max = -256,
936+
y_min = -31000,
944937
heat_point = 0,
945938
humidity_point = 73,
946939
})
@@ -998,7 +991,15 @@ function default.register_biomes(upper_limit)
998991
depth_riverbed = 2,
999992
vertical_blend = 1,
1000993
y_max = -4,
1001-
y_min = -112,
994+
y_min = -255,
995+
heat_point = 0,
996+
humidity_point = 40,
997+
})
998+
999+
minetest.register_biome({
1000+
name = "tundra_under",
1001+
y_max = -256,
1002+
y_min = -31000,
10021003
heat_point = 0,
10031004
humidity_point = 40,
10041005
})
@@ -1031,7 +1032,15 @@ function default.register_biomes(upper_limit)
10311032
depth_riverbed = 2,
10321033
vertical_blend = 1,
10331034
y_max = 3,
1034-
y_min = -112,
1035+
y_min = -255,
1036+
heat_point = 25,
1037+
humidity_point = 70,
1038+
})
1039+
1040+
minetest.register_biome({
1041+
name = "taiga_under",
1042+
y_max = -256,
1043+
y_min = -31000,
10351044
heat_point = 25,
10361045
humidity_point = 70,
10371046
})
@@ -1064,7 +1073,15 @@ function default.register_biomes(upper_limit)
10641073
depth_riverbed = 2,
10651074
vertical_blend = 1,
10661075
y_max = 3,
1067-
y_min = -112,
1076+
y_min = -255,
1077+
heat_point = 20,
1078+
humidity_point = 35,
1079+
})
1080+
1081+
minetest.register_biome({
1082+
name = "snowy_grassland_under",
1083+
y_max = -256,
1084+
y_min = -31000,
10681085
heat_point = 20,
10691086
humidity_point = 35,
10701087
})
@@ -1109,7 +1126,15 @@ function default.register_biomes(upper_limit)
11091126
node_riverbed = "default:sand",
11101127
depth_riverbed = 2,
11111128
y_max = 3,
1112-
y_min = -112,
1129+
y_min = -255,
1130+
heat_point = 50,
1131+
humidity_point = 35,
1132+
})
1133+
1134+
minetest.register_biome({
1135+
name = "grassland_under",
1136+
y_max = -256,
1137+
y_min = -31000,
11131138
heat_point = 50,
11141139
humidity_point = 35,
11151140
})
@@ -1154,7 +1179,15 @@ function default.register_biomes(upper_limit)
11541179
node_riverbed = "default:sand",
11551180
depth_riverbed = 2,
11561181
y_max = 3,
1157-
y_min = -112,
1182+
y_min = -255,
1183+
heat_point = 45,
1184+
humidity_point = 70,
1185+
})
1186+
1187+
minetest.register_biome({
1188+
name = "coniferous_forest_under",
1189+
y_max = -256,
1190+
y_min = -31000,
11581191
heat_point = 45,
11591192
humidity_point = 70,
11601193
})
@@ -1199,7 +1232,15 @@ function default.register_biomes(upper_limit)
11991232
depth_riverbed = 2,
12001233
vertical_blend = 1,
12011234
y_max = -2,
1202-
y_min = -112,
1235+
y_min = -255,
1236+
heat_point = 60,
1237+
humidity_point = 68,
1238+
})
1239+
1240+
minetest.register_biome({
1241+
name = "deciduous_forest_under",
1242+
y_max = -256,
1243+
y_min = -31000,
12031244
heat_point = 60,
12041245
humidity_point = 68,
12051246
})
@@ -1232,7 +1273,15 @@ function default.register_biomes(upper_limit)
12321273
depth_riverbed = 2,
12331274
vertical_blend = 1,
12341275
y_max = 3,
1235-
y_min = -112,
1276+
y_min = -255,
1277+
heat_point = 92,
1278+
humidity_point = 16,
1279+
})
1280+
1281+
minetest.register_biome({
1282+
name = "desert_under",
1283+
y_max = -256,
1284+
y_min = -31000,
12361285
heat_point = 92,
12371286
humidity_point = 16,
12381287
})
@@ -1264,7 +1313,15 @@ function default.register_biomes(upper_limit)
12641313
node_riverbed = "default:sand",
12651314
depth_riverbed = 2,
12661315
y_max = 3,
1267-
y_min = -112,
1316+
y_min = -255,
1317+
heat_point = 60,
1318+
humidity_point = 0,
1319+
})
1320+
1321+
minetest.register_biome({
1322+
name = "sandstone_desert_under",
1323+
y_max = -256,
1324+
y_min = -31000,
12681325
heat_point = 60,
12691326
humidity_point = 0,
12701327
})
@@ -1295,7 +1352,15 @@ function default.register_biomes(upper_limit)
12951352
depth_riverbed = 2,
12961353
vertical_blend = 1,
12971354
y_max = 3,
1298-
y_min = -112,
1355+
y_min = -255,
1356+
heat_point = 40,
1357+
humidity_point = 0,
1358+
})
1359+
1360+
minetest.register_biome({
1361+
name = "cold_desert_under",
1362+
y_max = -256,
1363+
y_min = -31000,
12991364
heat_point = 40,
13001365
humidity_point = 0,
13011366
})
@@ -1340,7 +1405,15 @@ function default.register_biomes(upper_limit)
13401405
depth_riverbed = 2,
13411406
vertical_blend = 1,
13421407
y_max = -2,
1343-
y_min = -112,
1408+
y_min = -255,
1409+
heat_point = 89,
1410+
humidity_point = 42,
1411+
})
1412+
1413+
minetest.register_biome({
1414+
name = "savanna_under",
1415+
y_max = -256,
1416+
y_min = -31000,
13441417
heat_point = 89,
13451418
humidity_point = 42,
13461419
})
@@ -1385,19 +1458,17 @@ function default.register_biomes(upper_limit)
13851458
depth_riverbed = 2,
13861459
vertical_blend = 1,
13871460
y_max = -2,
1388-
y_min = -112,
1461+
y_min = -255,
13891462
heat_point = 86,
13901463
humidity_point = 65,
13911464
})
13921465

1393-
-- Underground
1394-
13951466
minetest.register_biome({
1396-
name = "underground",
1397-
y_max = -113,
1467+
name = "rainforest_under",
1468+
y_max = -256,
13981469
y_min = -31000,
1399-
heat_point = 50,
1400-
humidity_point = 50,
1470+
heat_point = 86,
1471+
humidity_point = 65,
14011472
})
14021473
end
14031474

0 commit comments

Comments
 (0)
Please sign in to comment.