1 local mg_name
= minetest
.get_mapgen_setting("mg_name")
7 local function register_classic_superflat_biome()
8 -- Classic Superflat: bedrock (not part of biome), 2 dirt, 1 grass block
9 minetest
.register_biome({
11 node_top
= "mcl_core:dirt_with_grass",
13 node_filler
= "mcl_core:dirt",
15 node_stone
= "mcl_core:dirt",
16 y_min
= mcl_vars
.mg_overworld_min
- 512,
17 y_max
= mcl_vars
.mg_overworld_max
,
23 -- All mapgens except mgv6, flat and singlenode
24 local function register_biomes()
28 minetest
.register_biome({
29 name
= "ice_plains_spike",
30 node_top
= "mcl_core:snowblock",
32 node_filler
= "mcl_core:snowblock",
34 node_water_top
= "mcl_core:ice",
36 node_river_water
= "mcl_core:ice",
37 node_riverbed
= "mcl_core:sand",
40 y_max
= mcl_vars
.mg_overworld_max
,
46 minetest
.register_biome({
47 name
= "ice_plains_spike_ocean",
48 node_top
= "mcl_core:gravel",
50 node_filler
= "mcl_core:dirt",
52 node_water_top
= "mcl_core:ice",
54 node_river_water
= "mcl_core:ice",
55 node_riverbed
= "mcl_core:sand",
57 y_min
= mcl_vars
.mg_overworld_min
,
64 minetest
.register_biome({
66 node_dust
= "mcl_core:snow",
67 node_top
= "mcl_core:dirt_with_grass_snow",
69 node_filler
= "mcl_core:dirt",
71 node_riverbed
= "mcl_core:sand",
74 y_max
= mcl_vars
.mg_overworld_max
,
79 minetest
.register_biome({
80 name
= "cold_taiga_beach",
81 node_dust
= "mcl_core:snow",
82 node_top
= "mcl_core:sand",
84 node_water_top
= "mcl_core:ice",
86 node_filler
= "mcl_core:sand",
88 node_riverbed
= "mcl_core:sand",
96 minetest
.register_biome({
97 name
= "cold_taiga_ocean",
98 node_top
= "mcl_core:dirt",
100 node_filler
= "mcl_core:dirt",
102 node_riverbed
= "mcl_core:sand",
104 y_min
= mcl_vars
.mg_overworld_min
,
111 minetest
.register_biome({
113 node_top
= "mcl_core:podzol",
115 node_filler
= "mcl_core:dirt",
117 node_riverbed
= "mcl_core:sand",
120 y_max
= mcl_vars
.mg_overworld_max
,
125 minetest
.register_biome({
126 name
= "mega_taiga_ocean",
127 node_top
= "mcl_core:dirt",
129 node_filler
= "mcl_core:dirt",
131 node_riverbed
= "mcl_core:sand",
133 y_min
= mcl_vars
.mg_overworld_min
,
140 minetest
.register_biome({
141 name
= "mega_spruce_taiga",
142 node_top
= "mcl_core:podzol",
144 node_filler
= "mcl_core:dirt",
146 node_riverbed
= "mcl_core:sand",
149 y_max
= mcl_vars
.mg_overworld_max
,
154 minetest
.register_biome({
155 name
= "mega_spruce_taiga_ocean",
156 node_top
= "mcl_core:dirt",
158 node_filler
= "mcl_core:dirt",
160 node_riverbed
= "mcl_core:sand",
162 y_min
= mcl_vars
.mg_overworld_min
,
169 minetest
.register_biome({
171 node_dust
= "mcl_core:snow",
172 node_top
= "mcl_core:dirt_with_grass_snow",
174 node_filler
= "mcl_core:dirt",
176 node_water_top
= "mcl_core:ice",
178 node_river_water
= "mcl_core:ice",
179 node_riverbed
= "mcl_core:sand",
182 y_max
= mcl_vars
.mg_overworld_max
,
187 minetest
.register_biome({
188 name
= "ice_plains_ocean",
189 node_top
= "mcl_core:dirt",
191 node_filler
= "mcl_core:dirt",
193 node_riverbed
= "mcl_core:sand",
195 y_min
= mcl_vars
.mg_overworld_min
,
202 minetest
.register_biome({
204 node_top
= "mcl_core:dirt_with_grass",
206 node_filler
= "mcl_core:dirt",
208 node_riverbed
= "mcl_core:sand",
211 y_max
= mcl_vars
.mg_overworld_max
,
216 minetest
.register_biome({
217 name
= "plains_beach",
218 node_top
= "mcl_core:sand",
220 node_filler
= "mcl_core:sand",
222 node_riverbed
= "mcl_core:sand",
230 minetest
.register_biome({
231 name
= "plains_ocean",
232 node_top
= "mcl_core:dirt",
234 node_filler
= "mcl_core:dirt",
236 node_riverbed
= "mcl_core:sand",
238 y_min
= mcl_vars
.mg_overworld_min
,
244 -- TODO: Sunflower Plains
246 minetest.register_biome({
247 name = "sunflower_plains",
248 node_top = "mcl_core:dirt_with_grass",
250 node_filler = "mcl_core:dirt",
252 node_riverbed = "mcl_core:sand",
255 y_max = mcl_vars.mg_overworld_max,
257 humidity_point = 22.5,
260 minetest.register_biome({
261 name = "sunflower_plains_ocean",
262 node_top = "mcl_core:dirt",
264 node_filler = "mcl_core:dirt",
266 node_riverbed = "mcl_core:dirt",
268 y_min = mcl_vars.mg_overworld_min,
271 humidity_point = 22.5,
276 minetest
.register_biome({
278 node_top
= "mcl_core:dirt_with_grass",
280 node_filler
= "mcl_core:dirt",
282 node_riverbed
= "mcl_core:sand",
285 y_max
= mcl_vars
.mg_overworld_max
,
287 humidity_point
= 73, --was 70
290 minetest
.register_biome({
291 name
= "taiga_beach",
292 node_top
= "mcl_core:sand",
294 node_filler
= "mcl_core:dirt",
296 node_riverbed
= "mcl_core:sand",
301 humidity_point
= 73, --was 70
304 minetest
.register_biome({
305 name
= "taiga_ocean",
306 node_top
= "mcl_core:sand",
308 node_filler
= "mcl_core:dirt",
310 node_riverbed
= "mcl_core:sand",
312 y_min
= mcl_vars
.mg_overworld_min
,
315 humidity_point
= 73, --was 70
318 -- (Deciduous) forest
319 minetest
.register_biome({
321 node_top
= "mcl_core:dirt_with_grass",
323 node_filler
= "mcl_core:dirt",
325 node_riverbed
= "mcl_core:sand",
328 y_max
= mcl_vars
.mg_overworld_max
,
330 humidity_point
= 44, --was 68
333 minetest
.register_biome({
334 name
= "forest_beach",
335 node_top
= "mcl_core:sand",
337 node_filler
= "mcl_core:dirt",
339 node_riverbed
= "mcl_core:sand",
344 humidity_point
= 44, --was 68
347 minetest
.register_biome({
348 name
= "forest_ocean",
349 node_top
= "mcl_core:dirt",
351 node_filler
= "mcl_core:dirt",
353 node_riverbed
= "mcl_core:sand",
355 y_min
= mcl_vars
.mg_overworld_min
,
358 humidity_point
= 44, --was 68
362 minetest
.register_biome({
363 name
= "flower_forest",
364 node_top
= "mcl_core:dirt_with_grass",
366 node_filler
= "mcl_core:dirt",
368 node_riverbed
= "mcl_core:sand",
371 y_max
= mcl_vars
.mg_overworld_max
,
376 minetest
.register_biome({
377 name
= "flower_forest_beach",
378 node_top
= "mcl_core:sand",
380 node_filler
= "mcl_core:dirt",
382 node_riverbed
= "mcl_core:sand",
390 minetest
.register_biome({
391 name
= "flower_forest_ocean",
392 node_top
= "mcl_core:dirt",
394 node_filler
= "mcl_core:dirt",
396 node_riverbed
= "mcl_core:sand",
398 y_min
= mcl_vars
.mg_overworld_min
,
405 minetest
.register_biome({
406 name
= "birch_forest",
407 node_top
= "mcl_core:dirt_with_grass",
409 node_filler
= "mcl_core:dirt",
411 node_riverbed
= "mcl_core:sand",
414 y_max
= mcl_vars
.mg_overworld_max
,
419 minetest
.register_biome({
420 name
= "birch_forest_ocean",
421 node_top
= "mcl_core:dirt",
423 node_filler
= "mcl_core:dirt",
425 node_riverbed
= "mcl_core:sand",
427 y_min
= mcl_vars
.mg_overworld_min
,
434 minetest
.register_biome({
435 name
= "birch_forest_m",
436 node_top
= "mcl_core:dirt_with_grass",
438 node_filler
= "mcl_core:dirt",
440 node_riverbed
= "mcl_core:sand",
443 y_max
= mcl_vars
.mg_overworld_max
,
448 minetest
.register_biome({
449 name
= "birch_forest_m_ocean",
450 node_top
= "mcl_core:dirt",
452 node_filler
= "mcl_core:dirt",
454 node_riverbed
= "mcl_core:sand",
456 y_min
= mcl_vars
.mg_overworld_min
,
463 minetest
.register_biome({
465 node_top
= "mcl_core:redsand",
467 node_filler
= "mcl_core:redsand",
469 node_riverbed
= "mcl_core:sand",
471 node_stone
= "mcl_core:redsandstone",
473 y_max
= mcl_vars
.mg_overworld_max
,
475 humidity_point
= 37, --was 16
478 minetest
.register_biome({
479 name
= "red_desert_ocean",
480 node_top
= "mcl_core:redsand",
482 node_filler
= "mcl_core:redsand",
484 node_riverbed
= "mcl_core:redsand",
486 y_min
= mcl_vars
.mg_overworld_min
,
489 humidity_point
= 37, --was 16
493 minetest
.register_biome({
495 node_top
= "mcl_core:sand",
497 node_filler
= "mcl_core:sand",
499 node_riverbed
= "mcl_core:sand",
501 node_stone
= "mcl_core:sandstone",
503 y_max
= mcl_vars
.mg_overworld_max
,
505 humidity_point
= 0, --was 0
508 minetest
.register_biome({
509 name
= "desert_ocean",
510 node_top
= "mcl_core:sand",
512 node_filler
= "mcl_core:sand",
514 node_riverbed
= "mcl_core:sand",
516 y_min
= mcl_vars
.mg_overworld_min
,
519 humidity_point
= 0, --was 0
523 minetest
.register_biome({
524 name
= "roofed_forest",
525 node_top
= "mcl_core:dirt_with_grass",
527 node_filler
= "mcl_core:dirt",
529 node_riverbed
= "mcl_core:sand",
532 y_max
= mcl_vars
.mg_overworld_max
,
537 minetest
.register_biome({
538 name
= "roofed_forest_ocean",
539 node_top
= "mcl_core:dirt",
541 node_filler
= "mcl_core:dirt",
543 node_riverbed
= "mcl_core:sand",
545 y_min
= mcl_vars
.mg_overworld_min
,
552 minetest
.register_biome({
554 node_top
= "mcl_colorblocks:hardened_clay",
556 node_filler
= "mcl_colorblocks:hardened_clay",
558 node_riverbed
= "mcl_core:redsand",
560 node_stone
= "mcl_colorblocks:hardened_clay",
562 y_max
= mcl_vars
.mg_overworld_max
,
567 minetest
.register_biome({
569 node_top
= "mcl_core:redsand",
571 node_filler
= "mcl_colorblocks:hardened_clay",
573 node_riverbed
= "mcl_core:redsand",
575 y_min
= mcl_vars
.mg_overworld_min
,
582 minetest
.register_biome({
584 node_top
= "mcl_core:dirt_with_grass",
586 node_filler
= "mcl_core:coarse_dirt",
588 node_riverbed
= "mcl_core:sand",
591 y_max
= mcl_vars
.mg_overworld_max
,
596 minetest
.register_biome({
597 name
= "savanna_beach",
598 node_top
= "mcl_core:sand",
600 node_filler
= "mcl_core:dirt",
602 node_riverbed
= "mcl_core:sand",
610 minetest
.register_biome({
611 name
= "savanna_ocean",
612 node_top
= "mcl_core:dirt",
614 node_filler
= "mcl_core:coarse_dirt",
616 node_riverbed
= "mcl_core:sand",
618 y_min
= mcl_vars
.mg_overworld_min
,
625 minetest
.register_biome({
627 node_top
= "mcl_core:dirt_with_grass",
629 node_filler
= "mcl_core:dirt",
631 node_riverbed
= "mcl_core:sand",
634 y_max
= mcl_vars
.mg_overworld_max
,
639 minetest
.register_biome({
640 name
= "jungle_shore",
641 node_top
= "mcl_core:dirt",
643 node_filler
= "mcl_core:dirt",
645 node_riverbed
= "mcl_core:sand",
653 minetest
.register_biome({
654 name
= "jungle_ocean",
655 node_top
= "mcl_core:dirt",
657 node_filler
= "mcl_core:dirt",
659 node_riverbed
= "mcl_core:sand",
661 y_min
= mcl_vars
.mg_overworld_min
,
668 minetest
.register_biome({
669 name
= "jungle_edge",
670 node_top
= "mcl_core:dirt_with_grass",
672 node_filler
= "mcl_core:dirt",
674 node_riverbed
= "mcl_core:sand",
677 y_max
= mcl_vars
.mg_overworld_max
,
682 minetest
.register_biome({
683 name
= "jungle_edge_shore",
684 node_top
= "mcl_core:dirt",
686 node_filler
= "mcl_core:dirt",
688 node_riverbed
= "mcl_core:sand",
696 minetest
.register_biome({
697 name
= "jungle_edge_ocean",
698 node_top
= "mcl_core:dirt",
700 node_filler
= "mcl_core:dirt",
702 node_riverbed
= "mcl_core:sand",
704 y_min
= mcl_vars
.mg_overworld_min
,
711 minetest
.register_biome({
713 node_top
= "mcl_core:dirt_with_grass",
715 node_filler
= "mcl_core:dirt",
717 node_riverbed
= "mcl_core:sand",
725 minetest
.register_biome({
726 name
= "swampland_shore",
727 node_top
= "mcl_core:dirt",
729 node_filler
= "mcl_core:dirt",
731 node_riverbed
= "mcl_core:sand",
739 minetest
.register_biome({
740 name
= "swampland_ocean",
741 node_top
= "mcl_core:sand",
743 node_filler
= "mcl_core:sand",
745 node_riverbed
= "mcl_core:sand",
754 -- TODO: Make sure these biomes only spawn in islands
755 minetest
.register_biome({
756 name
= "mushroom_island",
757 node_top
= "mcl_core:mycelium",
759 node_filler
= "mcl_core:dirt",
761 node_riverbed
= "mcl_core:sand",
769 minetest
.register_biome({
770 name
= "mushroom_island_shore",
771 node_top
= "mcl_core:mycelium",
773 node_filler
= "mcl_core:dirt",
775 node_riverbed
= "mcl_core:sand",
783 minetest
.register_biome({
784 name
= "mushroom_island_ocean",
785 node_top
= "mcl_core:dirt",
787 node_filler
= "mcl_core:dirt",
789 node_riverbed
= "mcl_core:sand",
791 y_min
= mcl_vars
.mg_overworld_min
,
800 -- Register biomes of non-Overworld biomes
801 local function register_dimension_biomes()
805 minetest
.register_biome({
807 node_filler
= "mcl_nether:netherrack",
808 node_stone
= "mcl_nether:netherrack",
810 node_river_water
= "air",
811 y_min
= mcl_vars
.mg_nether_min
,
812 -- FIXME: For some reason the Nether stops generating early if this constant is not added.
814 y_max
= mcl_vars
.mg_nether_max
+ 80,
820 minetest
.register_biome({
825 node_river_water
= "air",
826 -- FIXME: For some reason the End stops generating early if this constant is not added.
828 y_min
= mcl_vars
.mg_end_min
,
829 y_max
= mcl_vars
.mg_end_max
+ 80,
836 -- Register “fake” ores directly related to the biomes
837 local function register_biomelike_ores()
840 minetest
.register_ore({
842 ore
= "mcl_core:sandstone",
843 wherein
={"mcl_colorblocks:hardened_clay"},
849 noise_threshold
= 0.2,
850 noise_params
= {offset
=0, scale
=15, spread
={x
=130, y
=130, z
=130}, seed
=24, octaves
=3, persist
=0.70},
854 minetest
.register_ore({
856 ore
= "mcl_core:dirt",
857 wherein
= {"mcl_colorblocks:hardened_clay"},
863 noise_threshold
= 0.4,
864 noise_params
= {offset
=0, scale
=15, spread
={x
=130, y
=130, z
=130}, seed
=24, octaves
=3, persist
=0.70},
868 minetest
.register_ore({
870 ore
= "mcl_core:redsand",
871 wherein
= { "mcl_colorblocks:hardened_clay"},
877 noise_threshold
= 0.7,
878 noise_params
= {offset
=0, scale
=15, spread
={x
=130, y
=130, z
=130}, seed
=24, octaves
=3, persist
=0.70},
882 minetest
.register_ore({
884 ore
= "mcl_core:redsand",
885 wherein
= {"mcl_core:redsandstone", "mcl_colorblocks:hardened_clay"},
891 noise_threshold
= 0.4,
892 noise_params
= {offset
=0, scale
=15, spread
={x
=130, y
=130, z
=130}, seed
=24, octaves
=3, persist
=0.70},
897 minetest
.register_ore({
899 ore
= "mcl_colorblocks:hardened_clay_silver",
900 wherein
= {"mcl_colorblocks:hardened_clay"},
904 noise_threshold
= 0.0,
905 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, seed
=23, octaves
=3, persist
=0.70} ,
909 minetest
.register_ore({
911 ore
= "mcl_colorblocks:hardened_clay_brown",
912 wherein
= {"mcl_colorblocks:hardened_clay"},
916 noise_threshold
= 0.0,
917 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, seed
=23, octaves
=3, persist
=0.70},
921 minetest
.register_ore({
923 ore
= "mcl_colorblocks:hardened_clay_orange",
924 wherein
= {"mcl_colorblocks:hardened_clay"},
928 noise_threshold
= 0.0,
929 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, seed
=23, octaves
=3, persist
=0.70} ,
933 minetest
.register_ore({
935 ore
= "mcl_colorblocks:hardened_clay_red",
936 wherein
= {"mcl_colorblocks:hardened_clay"},
940 noise_threshold
= 0.0,
941 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, seed
=23, octaves
=3, persist
=0.70} ,
945 minetest
.register_ore({
947 ore
= "mcl_colorblocks:hardened_clay_yellow",
948 wherein
= {"mcl_colorblocks:hardened_clay"},
952 noise_threshold
= 0.0,
953 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, seed
=23, octaves
=3, persist
=0.70} ,
956 minetest
.register_ore({
958 ore
= "mcl_colorblocks:hardened_clay_orange",
959 wherein
= {"mcl_colorblocks:hardened_clay"},
963 noise_threshold
= 0.0,
964 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, seed
=23, octaves
=3, persist
=0.70} ,
967 minetest
.register_ore({
969 ore
= "mcl_colorblocks:hardened_clay_brown",
970 wherein
= {"mcl_colorblocks:hardened_clay"},
974 noise_threshold
= 0.0,
975 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, seed
=23, octaves
=3, persist
=0.70} ,
978 minetest
.register_ore({
980 ore
= "mcl_colorblocks:hardened_clay_yellow",
981 wherein
= {"mcl_colorblocks:hardened_clay"},
985 noise_threshold
= 0.0,
986 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, seed
=23, octaves
=3, persist
=0.70} ,
989 minetest
.register_ore({
991 ore
= "mcl_colorblocks:hardened_clay_white",
992 wherein
= {"mcl_colorblocks:hardened_clay"},
996 noise_threshold
= 0.0,
997 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, seed
=23, octaves
=3, persist
=0.70} ,
1000 minetest
.register_ore({
1002 ore
= "mcl_colorblocks:hardened_clay_yellow",
1003 wherein
= {"mcl_colorblocks:hardened_clay"},
1007 noise_threshold
= 0.0,
1008 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, seed
=23, octaves
=3, persist
=0.70} ,
1010 minetest
.register_ore({
1012 ore
= "mcl_colorblocks:hardened_clay_white",
1013 wherein
= {"mcl_colorblocks:hardened_clay"},
1017 noise_threshold
= 0.0,
1018 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, seed
=23, octaves
=3, persist
=0.70} ,
1019 biomes
= { "mesa" },
1021 minetest
.register_ore({
1023 ore
= "mcl_colorblocks:hardened_clay_silver",
1024 wherein
= {"mcl_colorblocks:hardened_clay"},
1028 noise_threshold
= 0.0,
1029 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, seed
=23, octaves
=3, persist
=0.70} ,
1030 biomes
= { "mesa" },
1034 -- Non-Overworld ores
1035 local function register_dimension_ores()
1037 --[[ NETHER GENERATION ]]
1040 minetest
.register_ore({
1042 ore
= "mcl_nether:soul_sand",
1043 -- Note: Stone is included only for v6 mapgen support. Netherrack is not generated naturally
1044 -- in v6, but instead set with the on_generated function in mcl_mapgen_core.
1045 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1046 clust_scarcity
= 13 * 13 * 13,
1048 y_min
= mcl_vars
.mg_nether_min
,
1049 y_max
= mcl_util
.layer_to_y(64, "nether"),
1050 noise_threshold
= 0.0,
1054 spread
= {x
= 5, y
= 5, z
= 5},
1062 minetest
.register_ore({
1064 ore
= "mcl_nether:magma",
1065 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1066 clust_scarcity
= 8*8*8,
1067 clust_num_ores
= 45,
1069 y_min
= mcl_util
.layer_to_y(23, "nether"),
1070 y_max
= mcl_util
.layer_to_y(37, "nether"),
1072 minetest
.register_ore({
1074 ore
= "mcl_nether:magma",
1075 wherein
= {"mcl_nether:netherrack"},
1076 clust_scarcity
= 10*10*10,
1077 clust_num_ores
= 65,
1079 y_min
= mcl_util
.layer_to_y(23, "nether"),
1080 y_max
= mcl_util
.layer_to_y(37, "nether"),
1084 minetest
.register_ore({
1086 ore
= "mcl_nether:glowstone",
1087 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1088 clust_scarcity
= 26 * 26 * 26,
1090 y_min
= mcl_vars
.mg_lava_nether_max
+ 10,
1091 y_max
= mcl_vars
.mg_nether_max
,
1092 noise_threshold
= 0.0,
1096 spread
= {x
= 5, y
= 5, z
= 5},
1104 minetest
.register_ore({
1106 ore
= "mcl_core:gravel",
1107 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1108 column_height_min
= 1,
1109 column_height_max
= 1,
1110 column_midpoint_factor
= 0,
1111 y_min
= mcl_util
.layer_to_y(63, "nether"),
1112 -- This should be 65, but for some reason with this setting, the sheet ore really stops at 65. o_O
1113 y_max
= mcl_util
.layer_to_y(65+2, "nether"),
1114 noise_threshold
= 0.2,
1118 spread
= {x
= 20, y
= 20, z
= 20},
1126 minetest
.register_ore({
1127 ore_type
= "scatter",
1128 ore
= "mcl_nether:quartz_ore",
1129 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1130 clust_scarcity
= 850,
1131 clust_num_ores
= 4, -- MC cluster amount: 4-10
1133 y_min
= mcl_vars
.mg_nether_min
,
1134 y_max
= mcl_vars
.mg_nether_max
,
1136 minetest
.register_ore({
1137 ore_type
= "scatter",
1138 ore
= "mcl_nether:quartz_ore",
1139 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1140 clust_scarcity
= 1650,
1141 clust_num_ores
= 8, -- MC cluster amount: 4-10
1143 y_min
= mcl_vars
.mg_nether_min
,
1144 y_max
= mcl_vars
.mg_nether_max
,
1147 -- Lava springs in the Nether
1148 minetest
.register_ore({
1149 ore_type
= "scatter",
1150 ore
= "mcl_nether:nether_lava_source",
1151 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1152 clust_scarcity
= 500,
1155 y_min
= mcl_vars
.mg_nether_min
,
1156 y_max
= mcl_vars
.mg_lava_nether_max
+ 1,
1159 minetest
.register_ore({
1160 ore_type
= "scatter",
1161 ore
= "mcl_nether:nether_lava_source",
1162 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1163 clust_scarcity
= 1000,
1166 y_min
= mcl_vars
.mg_lava_nether_max
+ 2,
1167 y_max
= mcl_vars
.mg_lava_nether_max
+ 12,
1170 minetest
.register_ore({
1171 ore_type
= "scatter",
1172 ore
= "mcl_nether:nether_lava_source",
1173 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1174 clust_scarcity
= 2000,
1177 y_min
= mcl_vars
.mg_lava_nether_max
+ 13,
1178 y_max
= mcl_vars
.mg_lava_nether_max
+ 48,
1180 minetest
.register_ore({
1181 ore_type
= "scatter",
1182 ore
= "mcl_nether:nether_lava_source",
1183 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1184 clust_scarcity
= 3500,
1187 y_min
= mcl_vars
.mg_lava_nether_max
+ 49,
1188 y_max
= mcl_vars
.mg_nether_max
,
1193 -- Generate fake End
1194 -- TODO: Remove both "ores" when there's a better End generator
1196 minetest
.register_ore({
1198 ore
= "mcl_end:end_stone",
1200 y_min
= mcl_vars
.mg_end_min
+64,
1201 y_max
= mcl_vars
.mg_end_min
+80,
1202 column_height_min
= 6,
1203 column_height_max
= 7,
1204 column_midpoint_factor
= 0.0,
1208 spread
= {x
=100, y
=100, z
=100},
1213 noise_threshold
= 0,
1216 minetest
.register_ore({
1218 ore
= "mcl_end:end_stone",
1220 y_min
= mcl_vars
.mg_end_min
+64,
1221 y_max
= mcl_vars
.mg_end_min
+80,
1222 column_height_min
= 4,
1223 column_height_max
= 4,
1224 column_midpoint_factor
= 0.0,
1228 spread
= {x
=200, y
=200, z
=200},
1233 noise_threshold
= 0,
1239 -- All mapgens except mgv6
1241 -- Template to register a grass or fern decoration
1242 local function register_grass_decoration(grasstype
, offset
, scale
, biomes
)
1243 local place_on
, seed
, node
1244 if grasstype
== "fern" then
1245 node
= "mcl_flowers:fern"
1246 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:podzol"}
1248 elseif grasstype
== "tallgrass" then
1249 node
= "mcl_flowers:tallgrass"
1250 place_on
= {"mcl_core:dirt_with_grass"}
1256 spread
= {x
= 200, y
= 200, z
= 200},
1261 minetest
.register_decoration({
1262 deco_type
= "simple",
1263 place_on
= place_on
,
1265 noise_params
= noise
,
1268 y_max
= mcl_vars
.mg_overworld_max
,
1273 local function register_decorations()
1275 minetest
.register_decoration({
1276 deco_type
= "schematic",
1277 place_on
= {"mcl_core:snowblock", "mcl_core:snow", "mcl_core:dirt_with_grass_snow"},
1282 spread
= {x
= 250, y
= 250, z
= 250},
1287 biomes
= {"ice_plains_spike"},
1289 y_max
= mcl_vars
.mg_overworld_max
,
1290 schematic
= minetest
.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_large.mts",
1291 rotation
= "random",
1292 flags
= "place_center_x, place_center_z",
1296 minetest
.register_decoration({
1297 deco_type
= "schematic",
1298 place_on
= {"mcl_core:snowblock", "mcl_core:snow", "mcl_core:dirt_with_grass_snow"},
1303 spread
= {x
= 250, y
= 250, z
= 250},
1308 biomes
= {"ice_plains_spike"},
1310 y_max
= mcl_vars
.mg_overworld_max
,
1311 schematic
= minetest
.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_small.mts",
1312 rotation
= "random",
1313 flags
= "place_center_x, place_center_z",
1318 minetest
.register_decoration({
1319 deco_type
= "schematic",
1320 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1325 spread
= {x
= 250, y
= 250, z
= 250},
1330 biomes
= {"forest"},
1332 y_max
= mcl_vars
.mg_overworld_max
,
1333 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_large_1.mts",
1334 flags
= "place_center_x, place_center_z",
1335 rotation
= "random",
1337 minetest
.register_decoration({
1338 deco_type
= "schematic",
1339 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1344 spread
= {x
= 250, y
= 250, z
= 250},
1349 biomes
= {"forest"},
1351 y_max
= mcl_vars
.mg_overworld_max
,
1352 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_large_2.mts",
1353 flags
= "place_center_x, place_center_z",
1354 rotation
= "random",
1356 -- Small classic oak (forest, flower forest and ice plains)
1357 minetest
.register_decoration({
1358 deco_type
= "schematic",
1359 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1364 spread
= {x
= 250, y
= 250, z
= 250},
1369 biomes
= {"forest"},
1371 y_max
= mcl_vars
.mg_overworld_max
,
1372 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1373 flags
= "place_center_x, place_center_z",
1374 rotation
= "random",
1376 minetest
.register_decoration({
1377 deco_type
= "schematic",
1378 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1383 spread
= {x
= 250, y
= 250, z
= 250},
1388 biomes
= {"flower_forest"},
1390 y_max
= mcl_vars
.mg_overworld_max
,
1391 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1392 flags
= "place_center_x, place_center_z",
1393 rotation
= "random",
1395 minetest
.register_decoration({
1396 deco_type
= "schematic",
1397 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:dirt_with_grass_snow"},
1402 spread
= {x
= 250, y
= 250, z
= 250},
1407 biomes
= {"ice_plains"},
1409 y_max
= mcl_vars
.mg_overworld_max
,
1410 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1411 flags
= "place_center_x, place_center_z",
1412 rotation
= "random",
1415 minetest
.register_decoration({
1416 deco_type
= "schematic",
1417 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1422 spread
= {x
= 250, y
= 250, z
= 250},
1427 biomes
= {"forest"},
1429 y_max
= mcl_vars
.mg_overworld_max
,
1430 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_balloon.mts",
1431 flags
= "place_center_x, place_center_z",
1432 rotation
= "random",
1435 minetest
.register_decoration({
1436 deco_type
= "schematic",
1437 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1442 spread
= {x
= 250, y
= 250, z
= 250},
1447 biomes
= {"swampland", "swampland_shore"},
1449 y_max
= mcl_vars
.mg_overworld_max
,
1450 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_swamp.mts",
1451 flags
= "place_center_x, place_center_z",
1452 rotation
= "random",
1456 minetest
.register_decoration({
1457 deco_type
= "schematic",
1458 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1460 fill_ratio
= 0.0025,
1461 biomes
= {"jungle"},
1463 y_max
= mcl_vars
.mg_overworld_max
,
1464 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree_huge.mts",
1465 flags
= "place_center_x, place_center_z",
1466 rotation
= "random",
1468 minetest
.register_decoration({
1469 deco_type
= "schematic",
1470 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1473 biomes
= {"jungle"},
1475 y_max
= mcl_vars
.mg_overworld_max
,
1476 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree.mts",
1477 flags
= "place_center_x, place_center_z",
1478 rotation
= "random",
1480 minetest
.register_decoration({
1481 deco_type
= "schematic",
1482 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1484 fill_ratio
= 0.0045,
1485 biomes
= {"jungle_edge"},
1487 y_max
= mcl_vars
.mg_overworld_max
,
1488 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree.mts",
1489 flags
= "place_center_x, place_center_z",
1490 rotation
= "random",
1493 -- Oak in jungle / jungle edge
1494 minetest
.register_decoration({
1495 deco_type
= "schematic",
1496 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1499 biomes
= {"jungle"},
1501 y_max
= mcl_vars
.mg_overworld_max
,
1502 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1503 flags
= "place_center_x, place_center_z",
1504 rotation
= "random",
1506 minetest
.register_decoration({
1507 deco_type
= "schematic",
1508 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1510 fill_ratio
= 0.0004,
1511 biomes
= {"jungle_edge"},
1513 y_max
= mcl_vars
.mg_overworld_max
,
1514 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1515 flags
= "place_center_x, place_center_z",
1516 rotation
= "random",
1520 local function quick_spruce(seed
, offset
, sprucename
, biomes
)
1521 minetest
.register_decoration({
1522 deco_type
= "schematic",
1523 place_on
= {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"},
1528 spread
= {x
= 250, y
= 250, z
= 250},
1535 y_max
= mcl_vars
.mg_overworld_max
,
1536 schematic
= minetest
.get_modpath("mcl_core").."/schematics/"..sprucename
,
1537 flags
= "place_center_x, place_center_z",
1542 quick_spruce(3000, 0.001, "mcl_core_spruce_huge_1.mts", {"mega_spruce_taiga"})
1543 quick_spruce(4000, 0.00112, "mcl_core_spruce_huge_2.mts", {"mega_spruce_taiga"})
1544 quick_spruce(6000, 0.001, "mcl_core_spruce_huge_3.mts", {"mega_spruce_taiga"})
1547 quick_spruce(2500, 0.0062, "mcl_core_spruce_1.mts", {"mega_spruce_taiga", "mega_taiga", "taiga", "cold_taiga"})
1548 quick_spruce(5000, 0.0065, "mcl_core_spruce_2.mts", {"mega_spruce_taiga", "mega_taiga", "taiga", "cold_taiga"})
1549 quick_spruce(7000, 0.005, "mcl_core_spruce_3.mts", {"mega_spruce_taiga", "mega_taiga", "taiga", "cold_taiga"})
1551 -- Small lollipop spruce
1552 minetest
.register_decoration({
1553 deco_type
= "schematic",
1554 place_on
= {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"},
1559 spread
= {x
= 250, y
= 250, z
= 250},
1564 biomes
= {"taiga", "cold_taiga"},
1566 y_max
= mcl_vars
.mg_overworld_max
,
1567 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_spruce_lollipop.mts",
1568 flags
= "place_center_x, place_center_z",
1571 -- Matchstick spruce: Very few leaves, tall trunk
1572 minetest
.register_decoration({
1573 deco_type
= "schematic",
1574 place_on
= {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"},
1579 spread
= {x
= 250, y
= 250, z
= 250},
1584 biomes
= {"taiga", "cold_taiga"},
1586 y_max
= mcl_vars
.mg_overworld_max
,
1587 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_spruce_matchstick.mts",
1588 flags
= "place_center_x, place_center_z",
1592 minetest
.register_decoration({
1593 deco_type
= "schematic",
1594 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:coarse_dirt"},
1599 spread
= {x
= 250, y
= 250, z
= 250},
1604 biomes
= {"savanna"},
1606 y_max
= mcl_vars
.mg_overworld_max
,
1607 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_acacia_classic_1.mts",
1608 flags
= "place_center_x, place_center_z",
1609 rotation
= "random",
1612 minetest
.register_decoration({
1613 deco_type
= "schematic",
1614 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:coarse_dirt"},
1619 spread
= {x
= 250, y
= 250, z
= 250},
1624 biomes
= {"savanna"},
1626 y_max
= mcl_vars
.mg_overworld_max
,
1627 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_acacia_classic_2.mts",
1628 flags
= "place_center_x, place_center_z",
1629 rotation
= "random",
1633 minetest
.register_decoration({
1634 deco_type
= "schematic",
1635 place_on
= {"mcl_core:dirt_with_grass"},
1640 spread
= {x
= 250, y
= 250, z
= 250},
1645 biomes
= {"birch_forest"},
1647 y_max
= mcl_vars
.mg_overworld_max
,
1648 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_birch.mts",
1649 flags
= "place_center_x, place_center_z",
1651 minetest
.register_decoration({
1652 deco_type
= "schematic",
1653 place_on
= {"mcl_core:dirt_with_grass"},
1658 spread
= {x
= 250, y
= 250, z
= 250},
1663 biomes
= {"birch_forest_m"},
1665 y_max
= mcl_vars
.mg_overworld_max
,
1666 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_birch_tall.mts",
1667 flags
= "place_center_x, place_center_z",
1670 minetest
.register_decoration({
1671 deco_type
= "schematic",
1672 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1677 spread
= {x
= 250, y
= 250, z
= 250},
1682 biomes
= {"flower_forest"},
1684 y_max
= mcl_vars
.mg_overworld_max
,
1685 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_birch.mts",
1686 flags
= "place_center_x, place_center_z",
1688 minetest
.register_decoration({
1689 deco_type
= "schematic",
1690 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
1695 spread
= {x
= 250, y
= 250, z
= 250},
1700 biomes
= {"ice_plains"},
1702 y_max
= mcl_vars
.mg_overworld_max
,
1703 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_birch.mts",
1704 flags
= "place_center_x, place_center_z",
1708 minetest
.register_decoration({
1709 deco_type
= "schematic",
1710 place_on
= {"mcl_core:dirt_with_grass"},
1715 spread
= {x
= 125, y
= 125, z
= 125},
1720 biomes
= {"roofed_forest"},
1722 y_max
= mcl_vars
.mg_overworld_max
,
1723 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_dark_oak.mts",
1724 flags
= "place_center_x, place_center_z",
1725 rotation
= "random",
1729 local ratio_mushroom
= 0.0001
1730 local ratio_mushroom_huge
= ratio_mushroom
* (11/12)
1731 local ratio_mushroom_giant
= ratio_mushroom
* (1/12)
1732 local ratio_mushroom_mycelium
= 0.002
1733 local ratio_mushroom_mycelium_huge
= ratio_mushroom_mycelium
* (11/12)
1734 local ratio_mushroom_mycelium_giant
= ratio_mushroom_mycelium
* (1/12)
1736 -- Huge Brown Mushroom
1737 minetest
.register_decoration({
1738 deco_type
= "schematic",
1739 place_on
= { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
1741 fill_ratio
= ratio_mushroom_huge
,
1742 biomes
= { "roofed_forest" },
1744 y_max
= mcl_vars
.mg_overworld_max
,
1745 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts",
1746 flags
= "place_center_x, place_center_z",
1747 rotation
= "random",
1749 minetest
.register_decoration({
1750 deco_type
= "schematic",
1751 place_on
= { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
1753 fill_ratio
= ratio_mushroom_giant
,
1754 biomes
= { "roofed_forest" },
1756 y_max
= mcl_vars
.mg_overworld_max
,
1757 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_brown.mts",
1758 flags
= "place_center_x, place_center_z",
1759 rotation
= "random",
1762 minetest
.register_decoration({
1763 deco_type
= "schematic",
1764 place_on
= { "mcl_core:mycelium" },
1766 fill_ratio
= ratio_mushroom_mycelium_huge
,
1767 biomes
= { "mushroom_island", "mushroom_island_shore" },
1769 y_max
= mcl_vars
.mg_overworld_max
,
1770 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts",
1771 flags
= "place_center_x, place_center_z",
1772 rotation
= "random",
1774 minetest
.register_decoration({
1775 deco_type
= "schematic",
1776 place_on
= { "mcl_core:mycelium" },
1778 fill_ratio
= ratio_mushroom_mycelium_giant
,
1779 biomes
= { "mushroom_island", "mushroom_island_shore" },
1781 y_max
= mcl_vars
.mg_overworld_max
,
1782 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_brown.mts",
1783 flags
= "place_center_x, place_center_z",
1784 rotation
= "random",
1787 -- Huge Red Mushroom
1788 minetest
.register_decoration({
1789 deco_type
= "schematic",
1790 place_on
= { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
1792 fill_ratio
= ratio_mushroom_huge
,
1793 biomes
= { "roofed_forest" },
1795 y_max
= mcl_vars
.mg_overworld_max
,
1796 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts",
1797 flags
= "place_center_x, place_center_z",
1798 rotation
= "random",
1800 minetest
.register_decoration({
1801 deco_type
= "schematic",
1802 place_on
= { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
1804 fill_ratio
= ratio_mushroom_giant
,
1805 biomes
= { "roofed_forest" },
1807 y_max
= mcl_vars
.mg_overworld_max
,
1808 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_red.mts",
1809 flags
= "place_center_x, place_center_z",
1810 rotation
= "random",
1813 minetest
.register_decoration({
1814 deco_type
= "schematic",
1815 place_on
= { "mcl_core:mycelium" },
1817 fill_ratio
= ratio_mushroom_mycelium_huge
,
1818 biomes
= { "mushroom_island", "mushroom_island_shore" },
1820 y_max
= mcl_vars
.mg_overworld_max
,
1821 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts",
1822 flags
= "place_center_x, place_center_z",
1823 rotation
= "random",
1825 minetest
.register_decoration({
1826 deco_type
= "schematic",
1827 place_on
= { "mcl_core:mycelium" },
1829 fill_ratio
= ratio_mushroom_mycelium_giant
,
1830 biomes
= { "mushroom_island", "mushroom_island_shore" },
1832 y_max
= mcl_vars
.mg_overworld_max
,
1833 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_red.mts",
1834 flags
= "place_center_x, place_center_z",
1835 rotation
= "random",
1838 -- Moss stone boulder (3×3)
1839 minetest
.register_decoration({
1840 deco_type
= "schematic",
1841 place_on
= {"mcl_core:podzol", "mcl_core:dirt", "mcl_core:coarse_dirt"},
1846 spread
= {x
= 300, y
= 300, z
= 300},
1851 biomes
= {"mega_taiga", "mega_spruce_taiga"},
1853 y_max
= mcl_vars
.mg_overworld_max
,
1854 schematic
= minetest
.get_modpath("mcl_structures").."/schematics/mcl_structures_boulder.mts",
1855 flags
= "place_center_x, place_center_z",
1858 -- Small moss stone boulder (2×2)
1859 minetest
.register_decoration({
1860 deco_type
= "schematic",
1861 place_on
= {"mcl_core:podzol", "mcl_core:dirt", "mcl_core:coarse_dirt"},
1866 spread
= {x
= 300, y
= 300, z
= 300},
1871 biomes
= {"mega_taiga", "mega_spruce_taiga"},
1873 y_max
= mcl_vars
.mg_overworld_max
,
1874 schematic
= minetest
.get_modpath("mcl_structures").."/schematics/mcl_structures_boulder_small.mts",
1875 flags
= "place_center_x, place_center_z",
1879 minetest
.register_decoration({
1880 deco_type
= "simple",
1881 place_on
= {"group:sand"},
1886 spread
= {x
= 100, y
= 100, z
= 100},
1892 y_max
= mcl_vars
.mg_overworld_max
,
1893 decoration
= "mcl_core:cactus",
1894 biomes
= {"red_desert","desert"},
1900 minetest
.register_decoration({
1901 deco_type
= "simple",
1902 place_on
= {"mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_core:dirt_with_grass", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
1907 spread
= {x
= 100, y
= 100, z
= 100},
1912 biomes
= {"plains", "plains_beach", "taiga_beach", "ice_plains", "cold_taiga_beach", "savanna_beach", "forest_beach", "red_desert", "desert"},
1914 y_max
= mcl_vars
.mg_overworld_max
,
1915 decoration
= "mcl_core:reeds",
1918 spawn_by
= { "mcl_core:water_source", "group:frosted_ice" },
1921 minetest
.register_decoration({
1922 deco_type
= "simple",
1923 place_on
= {"mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_core:dirt_with_grass", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
1928 spread
= {x
= 100, y
= 100, z
= 100},
1933 biomes
= {"swampland"},
1935 y_max
= mcl_vars
.mg_overworld_max
,
1936 decoration
= "mcl_core:reeds",
1939 spawn_by
= { "mcl_core:water_source", "group:frosted_ice" },
1944 minetest
.register_decoration({
1945 deco_type
= "schematic",
1947 size
= { x
=1, y
=3, z
=1 },
1949 { name
= "air", prob
= 0 },
1950 { name
= "mcl_flowers:double_grass", param1
=255, },
1951 { name
= "mcl_flowers:double_grass_top", param1
=255, },
1955 ["mcl_flowers:tallgrass"] = "mcl_flowers:double_grass"
1957 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
1962 spread
= {x
= 300, y
= 300, z
= 300},
1968 y_max
= mcl_vars
.mg_overworld_max
,
1969 biomes
= {"plains", "sunflower_plains", "taiga", "forest", "flower_forest", "birch_forest", "birch_forest_m", "roofed_forest", "savanna"},
1973 minetest
.register_decoration({
1974 deco_type
= "schematic",
1976 size
= { x
=1, y
=3, z
=1 },
1978 { name
= "air", prob
= 0 },
1979 { name
= "mcl_flowers:double_fern", param1
=255, },
1980 { name
= "mcl_flowers:double_fern_top", param1
=255, },
1984 ["mcl_flowers:fern"] = "mcl_flowers:double_fern"
1986 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:podzol_snow"},
1992 spread
= {x
= 250, y
= 250, z
= 250},
1997 biomes
= { "jungle", "jungle_edge", "taiga", "cold_taiga", "mega_taiga", "mega_spruce_taiga" },
1999 y_max
= mcl_vars
.mg_overworld_max
,
2003 local register_large_flower
= function(name
, biomes
, seed
, offset
, flower_forest_offset
)
2005 if flower_forest_offset
then
2011 local o
, b
-- offset, biomes
2016 o
= flower_forest_offset
2017 b
= { "flower_forest" }
2020 minetest
.register_decoration({
2021 deco_type
= "schematic",
2023 size
= { x
=1, y
=3, z
=1 },
2025 { name
= "air", prob
= 0 },
2026 { name
= "mcl_flowers:"..name
, param1
=255, },
2027 { name
= "mcl_flowers:"..name
.."_top", param1
=255, },
2030 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2036 spread
= {x
= 300, y
= 300, z
= 300},
2042 y_max
= mcl_vars
.mg_overworld_max
,
2049 register_large_flower("rose_bush", {"forest"}, 9350, -0.008, 0.003)
2050 register_large_flower("peony", {"forest"}, 10450, -0.008, 0.003)
2051 register_large_flower("lilac", {"forest"}, 10600, -0.007, 0.003)
2053 register_large_flower("sunflower", {"plains", "sunflower_plains"}, 2940, 0.0)
2056 minetest
.register_decoration({
2057 deco_type
= "schematic",
2058 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2063 spread
= {x
= 250, y
= 250, z
= 250},
2068 biomes
= {"jungle"},
2070 y_max
= mcl_vars
.mg_overworld_max
,
2071 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_jungle_bush.mts",
2072 flags
= "place_center_x, place_center_z",
2074 minetest
.register_decoration({
2075 deco_type
= "schematic",
2076 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2081 spread
= {x
= 250, y
= 250, z
= 250},
2086 biomes
= {"jungle_edge"},
2088 y_max
= mcl_vars
.mg_overworld_max
,
2089 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_jungle_bush.mts",
2090 flags
= "place_center_x, place_center_z",
2094 minetest
.register_decoration({
2095 deco_type
= "schematic",
2096 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:coarse_dirt"},
2101 spread
= {x
= 250, y
= 250, z
= 250},
2106 biomes
= {"mega_taiga", "mega_spruce_taiga", "taiga"},
2108 y_max
= mcl_vars
.mg_overworld_max
,
2110 size
= {x
= 4, y
= 3, z
= 1},
2112 {name
= "air", prob
= 0},
2113 {name
= "air", prob
= 0},
2114 {name
= "air", prob
= 0},
2115 {name
= "air", prob
= 0},
2116 {name
= "mcl_core:sprucetree", param2
= 12, prob
= 127},
2117 {name
= "mcl_core:sprucetree", param2
= 12},
2118 {name
= "mcl_core:sprucetree", param2
= 12},
2119 {name
= "mcl_core:sprucetree", param2
= 12, prob
= 127},
2120 {name
= "air", prob
= 0},
2121 {name
= "mcl_mushrooms:mushroom_brown", prob
= 160},
2122 {name
= "mcl_mushrooms:mushroom_red", prob
= 160},
2123 {name
= "air", prob
= 0},
2126 flags
= "place_center_x",
2127 rotation
= "random",
2130 minetest
.register_decoration({
2131 deco_type
= "schematic",
2132 place_on
= {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:podzol_snow", "mcl_core:coarse_dirt"},
2137 spread
= {x
= 250, y
= 250, z
= 250},
2142 biomes
= {"cold_taiga"},
2144 y_max
= mcl_vars
.mg_overworld_max
,
2146 size
= {x
= 4, y
= 3, z
= 1},
2148 {name
= "air", prob
= 0},
2149 {name
= "air", prob
= 0},
2150 {name
= "air", prob
= 0},
2151 {name
= "air", prob
= 0},
2152 {name
= "mcl_core:sprucetree", param2
= 12, prob
= 127},
2153 {name
= "mcl_core:sprucetree", param2
= 12},
2154 {name
= "mcl_core:sprucetree", param2
= 12},
2155 {name
= "mcl_core:sprucetree", param2
= 12, prob
= 127},
2156 {name
= "air", prob
= 0},
2157 {name
= "air", prob
= 0},
2158 {name
= "air", prob
= 0},
2159 {name
= "air", prob
= 0},
2162 flags
= "place_center_x",
2163 rotation
= "random",
2166 minetest
.register_decoration({
2167 deco_type
= "schematic",
2168 place_on
= {"mcl_core:dirt_with_grass"},
2173 spread
= {x
= 250, y
= 250, z
= 250},
2178 biomes
= {"forest", "birch_forest", "birch_forest_m",},
2180 y_max
= mcl_vars
.mg_overworld_max
,
2182 size
= {x
= 3, y
= 3, z
= 1},
2184 {name
= "air", prob
= 0},
2185 {name
= "air", prob
= 0},
2186 {name
= "air", prob
= 0},
2187 {name
= "mcl_core:birchtree", param2
= 12},
2188 {name
= "mcl_core:birchtree", param2
= 12},
2189 {name
= "mcl_core:birchtree", param2
= 12, prob
= 127},
2190 {name
= "mcl_mushrooms:mushroom_red", prob
= 100},
2191 {name
= "mcl_mushrooms:mushroom_brown", prob
= 10},
2192 {name
= "air", prob
= 0},
2195 flags
= "place_center_x",
2196 rotation
= "random",
2199 minetest
.register_decoration({
2200 deco_type
= "schematic",
2201 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2204 biomes
= {"jungle"},
2206 y_max
= mcl_vars
.mg_overworld_max
,
2208 size
= {x
= 4, y
= 3, z
= 1},
2210 {name
= "air", prob
= 0},
2211 {name
= "air", prob
= 0},
2212 {name
= "air", prob
= 0},
2213 {name
= "air", prob
= 0},
2214 {name
= "mcl_core:jungletree", param2
= 12, prob
= 127},
2215 {name
= "mcl_core:jungletree", param2
= 12},
2216 {name
= "mcl_core:jungletree", param2
= 12},
2217 {name
= "mcl_core:jungletree", param2
= 12, prob
= 127},
2218 {name
= "air", prob
= 0},
2219 {name
= "mcl_mushrooms:mushroom_brown", prob
= 50},
2220 {name
= "air", prob
= 0},
2221 {name
= "air", prob
= 0},
2224 flags
= "place_center_x",
2225 rotation
= "random",
2228 minetest
.register_decoration({
2229 deco_type
= "schematic",
2230 place_on
= {"mcl_core:dirt_with_grass"},
2235 spread
= {x
= 250, y
= 250, z
= 250},
2240 biomes
= {"forest"},
2242 y_max
= mcl_vars
.mg_overworld_max
,
2244 size
= {x
= 3, y
= 3, z
= 1},
2246 {name
= "air", prob
= 0},
2247 {name
= "air", prob
= 0},
2248 {name
= "air", prob
= 0},
2249 {name
= "mcl_core:tree", param2
= 12, prob
= 127},
2250 {name
= "mcl_core:tree", param2
= 12},
2251 {name
= "mcl_core:tree", param2
= 12},
2252 {name
= "air", prob
= 0},
2253 {name
= "mcl_mushrooms:mushroom_brown", prob
= 96},
2254 {name
= "mcl_mushrooms:mushroom_red", prob
= 96},
2257 flags
= "place_center_x",
2258 rotation
= "random",
2263 local lily_schem
= {
2264 { name
= "mcl_core:water_source" },
2265 { name
= "mcl_flowers:waterlily" },
2268 -- Spawn them in shallow water at ocean level in swamplands.
2269 -- Tweak lilydepth to change the maximum water depth
2272 for d
=1, lilydepth
do
2273 local height
= d
+ 2
2275 table.insert(lily_schem
, 1, { name
= "air", prob
= 0 })
2277 minetest
.register_decoration({
2278 deco_type
= "schematic",
2280 size
= { x
=1, y
=height
, z
=1 },
2283 place_on
= "mcl_core:dirt",
2288 spread
= {x
= 100, y
= 100, z
= 100},
2295 biomes
= { "swampland_shore" },
2296 rotation
= "random",
2301 minetest
.register_decoration({
2302 deco_type
= "simple",
2303 place_on
= {"mcl_core:dirt_with_grass"},
2308 spread
= {x
= 250, y
= 250, z
= 250},
2314 y_max
= mcl_vars
.mg_overworld_max
,
2315 decoration
= "mcl_farming:melon",
2316 biomes
= { "jungle", "jungle_edge" },
2320 minetest
.register_decoration({
2321 deco_type
= "schematic",
2323 size
= { x
=1, y
=2, z
=1 },
2325 { name
= "air", prob
= 0 },
2326 { name
= "mcl_farming:pumpkin_face", param1
=255, },
2329 place_on
= {"mcl_core:dirt_with_grass"},
2334 spread
= {x
= 125, y
= 125, z
= 125},
2339 biomes
= {"plains"},
2342 rotation
= "random",
2345 -- Grasses and ferns
2346 local grass_forest
= {"plains", "taiga", "forest", "flower_forest", "birch_forest", "birch_forest_m", "roofed_forest", "swampland" }
2347 local grass_plains
= {"plains", "savanna", "sunflower_plains", "jungle_edge"}
2348 local grass_savanna
= {"savanna"}
2350 register_grass_decoration("tallgrass", -0.03, 0.09, grass_forest
)
2351 register_grass_decoration("tallgrass", -0.015, 0.075, grass_forest
)
2352 register_grass_decoration("tallgrass", 0, 0.06, grass_forest
)
2353 register_grass_decoration("tallgrass", 0.015, 0.045, grass_forest
)
2354 register_grass_decoration("tallgrass", 0.03, 0.03, grass_forest
)
2355 register_grass_decoration("tallgrass", 0.01, 0.05, grass_forest
)
2356 register_grass_decoration("tallgrass", 0.03, 0.03, grass_plains
)
2357 register_grass_decoration("tallgrass", 0.05, 0.01, grass_plains
)
2358 register_grass_decoration("tallgrass", 0.07, -0.01, grass_plains
)
2359 register_grass_decoration("tallgrass", 0.09, -0.03, grass_plains
)
2360 register_grass_decoration("tallgrass", 0.18, -0.03, grass_savanna
)
2362 local fern_minimal
= { "jungle", "jungle_edge", "taiga", "mega_taiga", "mega_spruce_taiga", "cold_taiga" }
2363 local fern_low
= { "jungle", "jungle_edge", "taiga", "mega_taiga", "mega_spruce_taiga" }
2364 local fern_jungle
= { "jungle", "jungle_edge" }
2365 register_grass_decoration("fern", -0.03, 0.09, fern_minimal
)
2366 register_grass_decoration("fern", -0.015, 0.075, fern_minimal
)
2367 register_grass_decoration("fern", 0, 0.06, fern_minimal
)
2368 register_grass_decoration("fern", 0.015, 0.045, fern_low
)
2369 register_grass_decoration("fern", 0.03, 0.03, fern_low
)
2370 register_grass_decoration("fern", 0.01, 0.05, fern_full
)
2371 register_grass_decoration("fern", 0.03, 0.03, fern_full
)
2372 register_grass_decoration("fern", 0.05, 0.01, fern_full
)
2373 register_grass_decoration("fern", 0.07, -0.01, fern_full
)
2374 register_grass_decoration("fern", 0.09, -0.03, fern_full
)
2376 -- Tall grass in ice plains
2377 minetest
.register_decoration({
2378 deco_type
= "schematic",
2379 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
2384 spread
= {x
= 15, y
= 15, z
= 15},
2389 biomes
= {"ice_plains"},
2391 y_max
= mcl_vars
.mg_overworld_max
,
2393 size
= { x
=1, y
=2, z
=1 },
2395 { name
= "mcl_core:dirt_with_grass", force_place
=true, },
2396 { name
= "mcl_flowers:tallgrass", },
2402 minetest
.register_decoration({
2403 deco_type
= "simple",
2404 place_on
= {"group:sand", "mcl_core:podzol", "mcl_core:podzol_snow", "mcl_core:dirt", "mcl_core:coarse_dirt", "group:hardened_clay"},
2409 spread
= {x
= 100, y
= 100, z
= 100},
2415 y_max
= mcl_vars
.mg_overworld_max
,
2416 biomes
= {"red_desert", "desert", "mesa", "taiga", "mega_taiga"},
2417 decoration
= "mcl_core:deadbush",
2421 -- Mushrooms in mushroom biome
2422 minetest
.register_decoration({
2423 deco_type
= "simple",
2424 place_on
= {"mcl_core:mycelium"},
2427 biomes
= {"mushroom_island", "mushroom_island_shore"},
2428 noise_threshold
= 2.0,
2429 y_min
= mcl_vars
.mg_overworld_min
,
2430 y_max
= mcl_vars
.mg_overworld_max
,
2431 decoration
= "mcl_mushrooms:mushroom_red",
2433 minetest
.register_decoration({
2434 deco_type
= "simple",
2435 place_on
= {"mcl_core:mycelium"},
2438 biomes
= {"mushroom_island", "mushroom_island_shore"},
2439 y_min
= mcl_vars
.mg_overworld_min
,
2440 y_max
= mcl_vars
.mg_overworld_max
,
2441 decoration
= "mcl_mushrooms:mushroom_brown",
2444 -- Mushrooms in taigas
2445 minetest
.register_decoration({
2446 deco_type
= "simple",
2447 place_on
= {"mcl_core:podzol"},
2450 biomes
= {"taiga", "mega_taiga", "mega_spruce_taiga"},
2451 y_min
= mcl_vars
.mg_overworld_min
,
2452 y_max
= mcl_vars
.mg_overworld_max
,
2453 decoration
= "mcl_mushrooms:mushroom_red",
2455 minetest
.register_decoration({
2456 deco_type
= "simple",
2457 place_on
= {"mcl_core:podzol"},
2460 biomes
= {"taiga", "mega_taiga", "mega_spruce_taiga"},
2461 y_min
= mcl_vars
.mg_overworld_min
,
2462 y_max
= mcl_vars
.mg_overworld_max
,
2463 decoration
= "mcl_mushrooms:mushroom_brown",
2467 -- Mushrooms next to trees
2468 local mushrooms
= {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}
2469 local mseeds
= { 7133, 8244 }
2470 for m
=1, #mushrooms
do
2471 -- Mushrooms next to trees
2472 minetest
.register_decoration({
2473 deco_type
= "simple",
2474 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
2479 spread
= {x
= 250, y
= 250, z
= 250},
2485 y_max
= mcl_vars
.mg_overworld_max
,
2486 decoration
= mushrooms
[m
],
2487 spawn_by
= { "mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree" },
2491 -- More mushrooms in swamplands
2492 minetest
.register_decoration({
2493 deco_type
= "simple",
2494 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
2499 spread
= {x
= 250, y
= 250, z
= 250},
2505 y_max
= mcl_vars
.mg_overworld_max
,
2506 decoration
= mushrooms
[m
],
2507 biomes
= { "swampland "},
2508 spawn_by
= { "mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree" },
2512 local function register_flower(name
, biomes
, seed
, is_in_flower_forest
)
2513 if is_in_flower_forest
== nil then
2514 is_in_flower_forest
= true
2517 minetest
.register_decoration({
2518 deco_type
= "simple",
2519 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2524 spread
= {x
= 100, y
= 100, z
= 100},
2530 y_max
= mcl_vars
.mg_overworld_max
,
2532 decoration
= "mcl_flowers:"..name
,
2535 if is_in_flower_forest
then
2536 minetest
.register_decoration({
2537 deco_type
= "simple",
2538 place_on
= {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2543 spread
= {x
= 100, y
= 100, z
= 100},
2549 y_max
= mcl_vars
.mg_overworld_max
,
2550 biomes
= {"flower_forest"},
2551 decoration
= "mcl_flowers:"..name
,
2556 local flower_biomes1
= {"plains", "sunflower_plains", "roofed_forest", "forest", "birch_forest", "birch_forest_m", "taiga", "cold_taiga", "jungle", "jungle_edge", "savanna" }
2558 register_flower("dandelion", flower_biomes1
, 8)
2559 register_flower("poppy", flower_biomes1
, 9439)
2561 local flower_biomes2
= {"plains", "sunflower_plains"}
2562 register_flower("tulip_red", flower_biomes2
, 436)
2563 register_flower("tulip_orange", flower_biomes2
, 536)
2564 register_flower("tulip_pink", flower_biomes2
, 636)
2565 register_flower("tulip_white", flower_biomes2
, 736)
2566 register_flower("azure_bluet", flower_biomes2
, 800)
2567 register_flower("oxeye_daisy", flower_biomes2
, 3490)
2569 register_flower("allium", nil, 0) -- flower forest only
2570 register_flower("blue_orchid", {"swampland"}, 64500, false)
2575 -- Decorations in non-Overworld dimensions
2576 local function register_dimension_decorations()
2581 -- Detect mapgen to select functions
2583 if mg_name
~= "singlenode" then
2584 minetest
.clear_registered_biomes()
2585 minetest
.clear_registered_decorations()
2586 minetest
.clear_registered_schematics()
2587 if mg_name
~= "v6" and mg_name
~= "flat" then
2589 register_biomelike_ores()
2590 register_decorations()
2591 elseif mg_name
== "flat" then
2592 -- Implementation of Minecraft's Superflat mapgen, classic style
2593 minetest
.clear_registered_biomes()
2594 minetest
.clear_registered_decorations()
2595 minetest
.clear_registered_schematics()
2596 register_classic_superflat_biome()
2599 -- Non-overworld stuff is registered independently
2600 register_dimension_biomes()
2601 register_dimension_ores()
2602 register_dimension_decorations()
2604 -- Overworld decorations for v6 are handled in mcl_mapgen_core