1 local mg_name
= minetest
.get_mapgen_setting("mg_name")
3 -- Some mapgen settings
4 local imitate
= minetest
.settings
:get("mcl_imitation_mode")
6 local generate_fallen_logs
= false
8 -- Jungle bush type. Default (PC/Java Edition) is Jungle Wood + Oak Leaves
9 local jungle_bush_schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_jungle_bush_oak_leaves.mts"
10 if imitate
== "pocket_edition" then
11 -- Simple fallen tree trunk logs (not very good yet)
12 generate_fallen_logs
= true
13 -- Jungle bush: Jungle Wood + Jungle Leaves
14 jungle_bush_schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_jungle_bush_jungle_leaves.mts"
21 local function register_classic_superflat_biome()
22 -- Classic Superflat: bedrock (not part of biome), 2 dirt, 1 grass block
23 minetest
.register_biome({
25 node_top
= "mcl_core:dirt_with_grass",
27 node_filler
= "mcl_core:dirt",
29 node_stone
= "mcl_core:dirt",
30 y_min
= mcl_vars
.mg_overworld_min
- 512,
31 y_max
= mcl_vars
.mg_overworld_max
,
37 -- All mapgens except mgv6, flat and singlenode
38 local function register_biomes()
41 --[[ These biomes try to resemble MC as good as possible. This means especially the floor cover and
42 the type of plants and structures (shapes might differ). The terrain itself will be of course different
43 and depends on the mapgen.
44 Important: MC also takes the terrain into account while MT biomes don't care about the terrain at all
46 MC has many “M” and “Hills” variants, most of which only differ in terrain compared to their original
48 In MT, any biome can occour in any terrain, so these variants are implied and are therefore
49 not explicitly implmented in MCL2. “M” variants are only included if they have another unique feature,
50 such as a different land cover.
51 In MCL2, the MC Overworld biomes are split in multiple more parts (stacked by height):
52 * The main part, this represents the land. It begins at around sea level and usually goes all the way up
53 * _ocean: For the area covered by ocean water. The y_max may vary for various beach effects.
54 Has sand or dirt as floor.
55 * _deep_ocean: Like _ocean, but deeper and has gravel as floor
57 * Other modifiers: Some complex biomes require more layers to improve the landscape.
59 The following naming conventions apply:
60 * The land biome name is equal to the MC biome name (in camel case)
61 * Height modifiers and sub-biomes are appended with underscores and in lowercase. Example: “_ocean”
62 * Non-MC biomes are written in lowercase
63 * MC dimension biomes are named after their MC dimension
65 Intentionally missing biomes:
66 * River (generated by valleys and v7)
67 * Frozen River (generated by valleys and v7)
81 * Improve Extreme Hills M
85 * Mushroom Island (must be on island)
86 * Stone Beach (must be at beaches only)
87 TODO: Find a way to position these biomes accordingly.
91 -- List of Overworld biomes without modifiers.
92 -- IMPORTANT: Don't forget to add new Overworld biomes to this list!
93 local overworld_biomes
= {
124 local OCEAN_MIN
= -15
125 local DEEP_OCEAN_MAX
= OCEAN_MIN
- 1
126 local DEEP_OCEAN_MIN
= -31
128 -- Ice Plains Spikes (rare)
129 minetest
.register_biome({
130 name
= "IcePlainsSpikes",
131 node_top
= "mcl_core:snowblock",
133 node_filler
= "mcl_core:dirt",
135 node_river_water
= "mcl_core:ice",
136 node_riverbed
= "mcl_core:sand",
139 y_max
= mcl_vars
.mg_overworld_max
,
143 minetest
.register_biome({
144 name
= "IcePlainsSpikes_ocean",
145 node_top
= "mcl_core:sand",
147 node_filler
= "mcl_core:dirt",
149 node_water_top
= "mcl_core:ice",
151 node_river_water
= "mcl_core:ice",
152 node_riverbed
= "mcl_core:sand",
161 minetest
.register_biome({
163 node_dust
= "mcl_core:snow",
164 node_top
= "mcl_core:dirt_with_grass_snow",
166 node_filler
= "mcl_core:dirt",
168 node_riverbed
= "mcl_core:sand",
171 y_max
= mcl_vars
.mg_overworld_max
,
176 -- A cold beach-like biome, implemented as low part of Cold Taiga
177 minetest
.register_biome({
178 name
= "ColdTaiga_beach",
179 node_dust
= "mcl_core:snow",
180 node_top
= "mcl_core:sand",
182 node_water_top
= "mcl_core:ice",
184 node_filler
= "mcl_core:sandstone",
186 node_riverbed
= "mcl_core:sand",
193 -- Water part of the beach. Added to prevent snow being on the ice.
194 minetest
.register_biome({
195 name
= "ColdTaiga_beach_water",
196 node_top
= "mcl_core:sand",
198 node_water_top
= "mcl_core:ice",
200 node_filler
= "mcl_core:sandstone",
202 node_riverbed
= "mcl_core:sand",
209 minetest
.register_biome({
210 name
= "ColdTaiga_ocean",
211 node_top
= "mcl_core:dirt",
213 node_filler
= "mcl_core:dirt",
215 node_riverbed
= "mcl_core:sand",
224 minetest
.register_biome({
226 node_top
= "mcl_core:podzol",
228 node_filler
= "mcl_core:dirt",
230 node_riverbed
= "mcl_core:sand",
233 y_max
= mcl_vars
.mg_overworld_max
,
237 minetest
.register_biome({
238 name
= "MegaTaiga_ocean",
239 node_top
= "mcl_core:dirt",
241 node_filler
= "mcl_core:dirt",
243 node_riverbed
= "mcl_core:sand",
252 minetest
.register_biome({
253 name
= "MegaSpruceTaiga",
254 node_top
= "mcl_core:podzol",
256 node_filler
= "mcl_core:dirt",
258 node_riverbed
= "mcl_core:sand",
261 y_max
= mcl_vars
.mg_overworld_max
,
262 humidity_point
= 100,
265 minetest
.register_biome({
266 name
= "MegaSpruceTaiga_ocean",
267 node_top
= "mcl_core:dirt",
269 node_filler
= "mcl_core:dirt",
271 node_riverbed
= "mcl_core:sand",
275 humidity_point
= 100,
280 minetest
.register_biome({
281 name
= "ExtremeHills",
282 node_top
= "mcl_core:dirt_with_grass",
284 node_filler
= "mcl_core:dirt",
286 node_riverbed
= "mcl_core:sand",
289 y_max
= mcl_vars
.mg_overworld_max
,
293 minetest
.register_biome({
294 name
= "ExtremeHills_beach",
295 node_top
= "mcl_core:sand",
298 node_filler
= "mcl_core:sandstone",
300 node_riverbed
= "mcl_core:sand",
307 minetest
.register_biome({
308 name
= "ExtremeHills_ocean",
309 node_top
= "mcl_core:dirt",
311 node_filler
= "mcl_core:dirt",
313 node_riverbed
= "mcl_core:sand",
322 minetest
.register_biome({
323 name
= "ExtremeHillsM",
324 node_top
= "mcl_core:gravel",
326 node_filler
= "mcl_core:gravel",
328 node_riverbed
= "mcl_core:gravel",
331 y_max
= mcl_vars
.mg_overworld_max
,
335 minetest
.register_biome({
336 name
= "ExtremeHillsM_ocean",
337 node_top
= "mcl_core:dirt",
339 node_filler
= "mcl_core:dirt",
341 node_riverbed
= "mcl_core:sand",
350 -- This biome is identical to Extreme Hills on the surface but has snow-covered mountains with spruce/oak
351 -- Forests above a certain height.
352 minetest
.register_biome({
353 name
= "ExtremeHills+",
354 node_top
= "mcl_core:dirt_with_grass",
356 node_filler
= "mcl_core:dirt",
358 node_riverbed
= "mcl_core:sand",
365 ---- Sub-biome for Extreme Hills+ for those snow Forests
366 minetest
.register_biome({
367 name
= "ExtremeHills+_snowtop",
368 node_dust
= "mcl_core:snow",
369 node_top
= "mcl_core:dirt_with_grass_snow",
371 node_filler
= "mcl_core:dirt",
373 node_riverbed
= "mcl_core:sand",
376 y_max
= mcl_vars
.mg_overworld_max
,
380 minetest
.register_biome({
381 name
= "ExtremeHills+_ocean",
382 node_top
= "mcl_core:dirt",
384 node_filler
= "mcl_core:dirt",
386 node_riverbed
= "mcl_core:sand",
395 -- TODO: Should occour only at real beaches.
396 minetest
.register_biome({
398 node_riverbed
= "mcl_core:sand",
401 y_max
= mcl_vars
.mg_overworld_max
,
406 minetest
.register_biome({
407 name
= "StoneBeach_ocean",
408 node_top
= "mcl_core:dirt",
410 node_riverbed
= "mcl_core:sand",
419 minetest
.register_biome({
421 node_dust
= "mcl_core:snow",
422 node_top
= "mcl_core:dirt_with_grass_snow",
424 node_filler
= "mcl_core:dirt",
426 node_water_top
= "mcl_core:ice",
428 node_river_water
= "mcl_core:ice",
429 node_riverbed
= "mcl_core:sand",
432 y_max
= mcl_vars
.mg_overworld_max
,
436 minetest
.register_biome({
437 name
= "IcePlains_ocean",
438 node_top
= "mcl_core:dirt",
440 node_filler
= "mcl_core:dirt",
442 node_riverbed
= "mcl_core:sand",
451 minetest
.register_biome({
453 node_top
= "mcl_core:dirt_with_grass",
455 node_filler
= "mcl_core:dirt",
457 node_riverbed
= "mcl_core:sand",
460 y_max
= mcl_vars
.mg_overworld_max
,
464 minetest
.register_biome({
465 name
= "Plains_beach",
466 node_top
= "mcl_core:sand",
468 node_filler
= "mcl_core:sandstone",
470 node_riverbed
= "mcl_core:sand",
477 minetest
.register_biome({
478 name
= "Plains_ocean",
479 node_top
= "mcl_core:dirt",
481 node_filler
= "mcl_core:dirt",
483 node_riverbed
= "mcl_core:sand",
492 minetest
.register_biome({
493 name
= "SunflowerPlains",
494 node_top
= "mcl_core:dirt_with_grass",
496 node_filler
= "mcl_core:dirt",
498 node_riverbed
= "mcl_core:sand",
501 y_max
= mcl_vars
.mg_overworld_max
,
505 minetest
.register_biome({
506 name
= "SunflowerPlains_ocean",
507 node_top
= "mcl_core:dirt",
509 node_filler
= "mcl_core:dirt",
511 node_riverbed
= "mcl_core:dirt",
520 minetest
.register_biome({
522 node_top
= "mcl_core:dirt_with_grass",
524 node_filler
= "mcl_core:dirt",
526 node_riverbed
= "mcl_core:sand",
529 y_max
= mcl_vars
.mg_overworld_max
,
533 minetest
.register_biome({
534 name
= "Taiga_beach",
535 node_top
= "mcl_core:sand",
537 node_filler
= "mcl_core:sandstone",
539 node_riverbed
= "mcl_core:sand",
546 minetest
.register_biome({
547 name
= "Taiga_ocean",
548 node_top
= "mcl_core:sand",
550 node_filler
= "mcl_core:dirt",
552 node_riverbed
= "mcl_core:sand",
561 minetest
.register_biome({
563 node_top
= "mcl_core:dirt_with_grass",
565 node_filler
= "mcl_core:dirt",
567 node_riverbed
= "mcl_core:sand",
570 y_max
= mcl_vars
.mg_overworld_max
,
574 minetest
.register_biome({
575 name
= "Forest_beach",
576 node_top
= "mcl_core:sand",
578 node_filler
= "mcl_core:sandstone",
580 node_riverbed
= "mcl_core:sand",
587 minetest
.register_biome({
588 name
= "Forest_ocean",
589 node_top
= "mcl_core:dirt",
591 node_filler
= "mcl_core:dirt",
593 node_riverbed
= "mcl_core:sand",
602 minetest
.register_biome({
603 name
= "FlowerForest",
604 node_top
= "mcl_core:dirt_with_grass",
606 node_filler
= "mcl_core:dirt",
608 node_riverbed
= "mcl_core:sand",
611 y_max
= mcl_vars
.mg_overworld_max
,
615 minetest
.register_biome({
616 name
= "FlowerForest_beach",
617 node_top
= "mcl_core:sand",
619 node_filler
= "mcl_core:sandstone",
621 node_riverbed
= "mcl_core:sand",
628 minetest
.register_biome({
629 name
= "FlowerForest_ocean",
630 node_top
= "mcl_core:dirt",
632 node_filler
= "mcl_core:dirt",
634 node_riverbed
= "mcl_core:sand",
643 minetest
.register_biome({
644 name
= "BirchForest",
645 node_top
= "mcl_core:dirt_with_grass",
647 node_filler
= "mcl_core:dirt",
649 node_riverbed
= "mcl_core:sand",
652 y_max
= mcl_vars
.mg_overworld_max
,
656 minetest
.register_biome({
657 name
= "BirchForest_ocean",
658 node_top
= "mcl_core:dirt",
660 node_filler
= "mcl_core:dirt",
662 node_riverbed
= "mcl_core:sand",
671 minetest
.register_biome({
672 name
= "BirchForestM",
673 node_top
= "mcl_core:dirt_with_grass",
675 node_filler
= "mcl_core:dirt",
677 node_riverbed
= "mcl_core:sand",
680 y_max
= mcl_vars
.mg_overworld_max
,
684 minetest
.register_biome({
685 name
= "BirchForestM_ocean",
686 node_top
= "mcl_core:dirt",
688 node_filler
= "mcl_core:dirt",
690 node_riverbed
= "mcl_core:sand",
699 minetest
.register_biome({
701 node_top
= "mcl_core:sand",
703 node_filler
= "mcl_core:sand",
705 node_riverbed
= "mcl_core:sand",
707 node_stone
= "mcl_core:sandstone",
709 y_max
= mcl_vars
.mg_overworld_max
,
713 minetest
.register_biome({
714 name
= "Desert_ocean",
715 node_top
= "mcl_core:sand",
717 node_filler
= "mcl_core:sand",
719 node_riverbed
= "mcl_core:sand",
728 minetest
.register_biome({
729 name
= "RoofedForest",
730 node_top
= "mcl_core:dirt_with_grass",
732 node_filler
= "mcl_core:dirt",
734 node_riverbed
= "mcl_core:sand",
737 y_max
= mcl_vars
.mg_overworld_max
,
741 minetest
.register_biome({
742 name
= "RoofedForest_ocean",
743 node_top
= "mcl_core:dirt",
745 node_filler
= "mcl_core:dirt",
747 node_riverbed
= "mcl_core:sand",
756 minetest
.register_biome({
758 node_top
= "mcl_colorblocks:hardened_clay",
760 node_filler
= "mcl_colorblocks:hardened_clay",
761 node_stone
= "mcl_colorblocks:hardened_clay",
763 y_max
= mcl_vars
.mg_overworld_max
,
767 -- Helper biome for the red sand at the bottom of Mesas.
768 minetest
.register_biome({
769 name
= "Mesa_sandlevel",
770 node_top
= "mcl_core:redsand",
772 node_filler
= "mcl_colorblocks:hardened_clay_orange",
774 node_riverbed
= "mcl_core:redsand",
776 node_stone
= "mcl_colorblocks:hardened_clay_orange",
782 minetest
.register_biome({
784 node_top
= "mcl_core:sand",
786 node_filler
= "mcl_core:sand",
788 node_riverbed
= "mcl_core:sand",
797 -- Identical to Mesa below Y=30. At Y=30 and above there is an oak forest
798 minetest
.register_biome({
799 name
= "MesaPlateauF",
800 node_top
= "mcl_colorblocks:hardened_clay",
802 node_filler
= "mcl_colorblocks:hardened_clay",
803 node_stone
= "mcl_colorblocks:hardened_clay",
810 -- The actual plateau of this biome
811 -- This is a plateau for grass blocks, tall grass, coarse dirt and oaks.
812 minetest
.register_biome({
813 name
= "MesaPlateauF_grasstop",
814 node_top
= "mcl_core:dirt_with_dry_grass",
816 node_filler
= "mcl_core:dirt",
818 node_stone
= "mcl_colorblocks:hardened_clay",
820 y_max
= mcl_vars
.mg_overworld_max
,
825 -- Helper biome for the red sand at the bottom.
826 minetest
.register_biome({
827 name
= "MesaPlateauF_sandlevel",
828 node_top
= "mcl_core:redsand",
830 node_filler
= "mcl_colorblocks:hardened_clay_orange",
832 node_riverbed
= "mcl_core:redsand",
834 node_stone
= "mcl_colorblocks:hardened_clay_orange",
840 minetest
.register_biome({
841 name
= "MesaPlateauF_ocean",
842 node_top
= "mcl_core:sand",
844 node_filler
= "mcl_colorblocks:sand",
846 node_riverbed
= "mcl_core:sand",
855 minetest
.register_biome({
857 node_top
= "mcl_core:dirt_with_dry_grass",
859 node_filler
= "mcl_core:dirt",
861 node_riverbed
= "mcl_core:sand",
864 y_max
= mcl_vars
.mg_overworld_max
,
868 minetest
.register_biome({
869 name
= "Savanna_beach",
870 node_top
= "mcl_core:sand",
872 node_filler
= "mcl_core:sandstone",
874 node_riverbed
= "mcl_core:sand",
881 minetest
.register_biome({
882 name
= "Savanna_ocean",
883 node_top
= "mcl_core:dirt",
885 node_filler
= "mcl_core:dirt",
887 node_riverbed
= "mcl_core:sand",
896 -- Changes to Savanna: Coarse Dirt. No sand beach. No oaks.
897 -- Otherwise identical to Savanna
898 minetest
.register_biome({
900 node_top
= "mcl_core:dirt_with_dry_grass",
902 node_filler
= "mcl_core:coarse_dirt",
904 node_riverbed
= "mcl_core:sand",
907 y_max
= mcl_vars
.mg_overworld_max
,
911 minetest
.register_biome({
912 name
= "SavannaM_ocean",
913 node_top
= "mcl_core:dirt",
915 node_filler
= "mcl_core:dirt",
917 node_riverbed
= "mcl_core:sand",
926 minetest
.register_biome({
928 node_top
= "mcl_core:dirt_with_grass",
930 node_filler
= "mcl_core:dirt",
932 node_riverbed
= "mcl_core:sand",
935 y_max
= mcl_vars
.mg_overworld_max
,
939 minetest
.register_biome({
940 name
= "Jungle_shore",
941 node_top
= "mcl_core:dirt",
943 node_filler
= "mcl_core:dirt",
945 node_riverbed
= "mcl_core:sand",
952 minetest
.register_biome({
953 name
= "Jungle_ocean",
954 node_top
= "mcl_core:dirt",
956 node_filler
= "mcl_core:dirt",
958 node_riverbed
= "mcl_core:sand",
967 -- Like Jungle but with even more dense vegetation
968 minetest
.register_biome({
970 node_top
= "mcl_core:dirt_with_grass",
972 node_filler
= "mcl_core:dirt",
974 node_riverbed
= "mcl_core:sand",
977 y_max
= mcl_vars
.mg_overworld_max
,
981 minetest
.register_biome({
982 name
= "JungleM_shore",
983 node_top
= "mcl_core:dirt",
985 node_filler
= "mcl_core:dirt",
987 node_riverbed
= "mcl_core:sand",
994 minetest
.register_biome({
995 name
= "JungleM_ocean",
996 node_top
= "mcl_core:dirt",
998 node_filler
= "mcl_core:dirt",
1000 node_riverbed
= "mcl_core:sand",
1004 humidity_point
= 92,
1009 minetest
.register_biome({
1010 name
= "JungleEdge",
1011 node_top
= "mcl_core:dirt_with_grass",
1013 node_filler
= "mcl_core:dirt",
1015 node_riverbed
= "mcl_core:sand",
1018 y_max
= mcl_vars
.mg_overworld_max
,
1019 humidity_point
= 88,
1022 minetest
.register_biome({
1023 name
= "JungleEdge_ocean",
1024 node_top
= "mcl_core:dirt",
1026 node_filler
= "mcl_core:dirt",
1028 node_riverbed
= "mcl_core:sand",
1032 humidity_point
= 88,
1036 -- Jungle Edge M (very rare).
1037 -- Almost identical to Jungle Edge. Has deeper dirt. Melons spawn here a lot.
1038 -- This biome occours directly between Jungle M and Jungle Edge but also has a small border to Jungle.
1039 -- This biome is very small in general.
1040 minetest
.register_biome({
1041 name
= "JungleEdgeM",
1042 node_top
= "mcl_core:dirt_with_grass",
1044 node_filler
= "mcl_core:dirt",
1046 node_riverbed
= "mcl_core:sand",
1049 y_max
= mcl_vars
.mg_overworld_max
,
1050 humidity_point
= 90,
1053 minetest
.register_biome({
1054 name
= "JungleEdgeM_ocean",
1055 node_top
= "mcl_core:dirt",
1057 node_filler
= "mcl_core:dirt",
1059 node_riverbed
= "mcl_core:sand",
1063 humidity_point
= 90,
1068 minetest
.register_biome({
1070 node_top
= "mcl_core:dirt_with_grass",
1072 node_filler
= "mcl_core:dirt",
1074 node_riverbed
= "mcl_core:sand",
1077 -- Note: Limited in height!
1079 humidity_point
= 90,
1082 minetest
.register_biome({
1083 name
= "Swampland_shore",
1084 node_top
= "mcl_core:dirt",
1086 node_filler
= "mcl_core:dirt",
1088 node_riverbed
= "mcl_core:sand",
1092 humidity_point
= 90,
1095 minetest
.register_biome({
1096 name
= "Swampland_ocean",
1097 node_top
= "mcl_core:sand",
1099 node_filler
= "mcl_core:sand",
1101 node_riverbed
= "mcl_core:sand",
1105 humidity_point
= 90,
1109 -- Mushroom Island / Mushroom Island Shore (rare)
1110 -- TODO: Make sure these biomes only spawn in islands
1111 minetest
.register_biome({
1112 name
= "MushroomIsland",
1113 node_top
= "mcl_core:mycelium",
1115 node_filler
= "mcl_core:dirt",
1117 node_riverbed
= "mcl_core:sand",
1120 -- Note: Limited in height!
1122 humidity_point
= 106,
1126 minetest
.register_biome({
1127 name
= "MushroomIslandShore",
1128 node_top
= "mcl_core:mycelium",
1130 node_filler
= "mcl_core:dirt",
1132 node_riverbed
= "mcl_core:sand",
1136 humidity_point
= 106,
1139 minetest
.register_biome({
1140 name
= "MushroomIsland_ocean",
1141 node_top
= "mcl_core:dirt",
1143 node_filler
= "mcl_core:dirt",
1145 node_riverbed
= "mcl_core:sand",
1149 humidity_point
= 106,
1153 -- Add deep ocean and underground biomes automatically.
1154 for i
=1, #overworld_biomes
do
1155 local biome
= overworld_biomes
[i
]
1157 -- Deep Ocean: Has gravel floor
1158 minetest
.register_biome({
1159 name
= biome
.. "_deep_ocean",
1160 heat_point
= minetest
.registered_biomes
[biome
].heat_point
,
1161 humidity_point
= minetest
.registered_biomes
[biome
].humidity_point
,
1162 y_min
= DEEP_OCEAN_MIN
,
1163 y_max
= DEEP_OCEAN_MAX
,
1164 node_top
= "mcl_core:gravel",
1166 node_filler
= "mcl_core:gravel",
1168 node_riverbed
= "mcl_core:gravel",
1172 -- Underground biomes are used to identify the underground and to prevent nodes from the surface
1173 -- (sand, dirt) from leaking into the underground.
1174 minetest
.register_biome({
1175 name
= biome
.. "_underground",
1176 heat_point
= minetest
.registered_biomes
[biome
].heat_point
,
1177 humidity_point
= minetest
.registered_biomes
[biome
].humidity_point
,
1178 y_min
= mcl_vars
.mg_overworld_min
,
1179 y_max
= DEEP_OCEAN_MIN
- 1,
1185 -- Register biomes of non-Overworld biomes
1186 local function register_dimension_biomes()
1190 minetest
.register_biome({
1192 node_filler
= "mcl_nether:netherrack",
1193 node_stone
= "mcl_nether:netherrack",
1195 node_river_water
= "air",
1196 y_min
= mcl_vars
.mg_nether_min
,
1197 -- FIXME: For some reason the Nether stops generating early if this constant is not added.
1199 y_max
= mcl_vars
.mg_nether_max
+ 80,
1205 minetest
.register_biome({
1208 node_filler
= "air",
1210 node_river_water
= "air",
1211 -- FIXME: For some reason the End stops generating early if this constant is not added.
1213 y_min
= mcl_vars
.mg_end_min
,
1214 y_max
= mcl_vars
.mg_end_max
+ 80,
1216 humidity_point
= 50,
1221 -- Register “fake” ores directly related to the biomes
1222 local function register_biomelike_ores()
1224 -- Random coarse dirt floor in Mega Taiga and Mesa Plateau F
1225 minetest
.register_ore({
1227 ore
= "mcl_core:coarse_dirt",
1228 wherein
= {"mcl_core:podzol", "mcl_core:dirt"},
1230 clust_num_ores
= 12,
1232 y_min
= mcl_vars
.mg_overworld_min
,
1233 y_max
= mcl_vars
.mg_overworld_max
,
1234 noise_threshold
= 0.2,
1235 noise_params
= {offset
=0, scale
=15, spread
={x
=130, y
=130, z
=130}, seed
=24, octaves
=3, persist
=0.70},
1236 biomes
= { "MegaTaiga" },
1239 minetest
.register_ore({
1241 ore
= "mcl_core:coarse_dirt",
1242 wherein
= {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"},
1243 column_height_max
= 1,
1244 column_midpoint_factor
= 0.0,
1245 y_min
= mcl_vars
.mg_overworld_min
,
1246 y_max
= mcl_vars
.mg_overworld_max
,
1247 noise_threshold
= 0.0,
1248 noise_params
= {offset
=0, scale
=15, spread
={x
=250, y
=250, z
=250}, seed
=24, octaves
=3, persist
=0.70},
1249 biomes
= { "MesaPlateauF_grasstop" },
1251 minetest
.register_ore({
1253 ore
= "mcl_core:coarse_dirt",
1254 wherein
= {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"},
1255 clust_scarcity
= 1500,
1256 clust_num_ores
= 25,
1258 y_min
= mcl_vars
.mg_overworld_min
,
1259 y_max
= mcl_vars
.mg_overworld_max
,
1260 biomes
= { "MesaPlateauF_grasstop" },
1263 -- Small dirt patches in Extreme Hills M
1264 minetest
.register_ore({
1266 -- TODO: Should be grass block. But generating this as ore means gras blocks will spawn undeground. :-(
1267 ore
= "mcl_core:dirt",
1268 wherein
= {"mcl_core:gravel"},
1269 clust_scarcity
= 5000,
1270 clust_num_ores
= 12,
1272 y_min
= mcl_vars
.mg_overworld_min
,
1273 y_max
= mcl_vars
.mg_overworld_max
,
1274 noise_threshold
= 0.2,
1275 noise_params
= {offset
=0, scale
=5, spread
={x
=250, y
=250, z
=250}, seed
=64, octaves
=3, persist
=0.60},
1276 biomes
= { "ExtremeHillsM" },
1280 -- Small hack to make sure stone appears at ca. sea level in Mesa biomes
1281 minetest
.register_ore({
1283 ore
= "mcl_core:stone",
1284 noise_threshold
= -100,
1285 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, octaves
=1, persist
=1.00},
1287 "Mesa", "Mesa_sandlevel", "Mesa_ocean", "Mesa_deep_ocean", "Mesa_underground",
1288 "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_ocean", "MesaPlateauF_deep_ocean", "MesaPlateauF_underground",
1290 wherein
= {"mcl_colorblocks:hardened_clay"},
1291 column_height_min
= 32,
1292 column_height_max
= 32,
1299 -- Mesa strata (registered as sheet ores)
1301 -- Helper function to create strata.
1302 local stratum
= function(y_min
, height
, color
, seed
)
1309 local y_max
= y_min
+ height
-1
1310 minetest
.register_ore({
1312 ore
= "mcl_colorblocks:hardened_clay_"..color
,
1313 wherein
= {"mcl_colorblocks:hardened_clay"},
1314 column_height_min
= height
,
1315 column_height_max
= height
,
1318 noise_threshold
= -1.0,
1319 noise_params
= {offset
=0, scale
=1, spread
={x
=3100, y
=3100, z
=3100}, seed
=seed
, octaves
=3, persist
=0.70},
1320 biomes
= { "Mesa", "MesaPlateauF", },
1324 -- First stratum near the sand level. Always orange.
1325 stratum(11, 3, "orange")
1327 -- Create random strata for up to Y = 256.
1328 -- These strata are calculated based on the world seed and are global.
1329 -- They are thus unique per-world.
1330 local mesapr
= PcgRandom(minetest
.get_mapgen_setting("seed"))
1334 ------ DANGER ZONE! ------
1336 The following code is sensitive to changes; changing any number may break
1337 mapgen consistency when the mapgen generates new mapchunks in existing
1338 worlds because the random generator will yield different results and the strata
1339 suddenly don't match up anymore. ]]
1341 -- Available Mesa colors:
1342 local mesa_stratum_colors
= { "silver", "brown", "orange", "red", "yellow", "white" }
1349 -- Each stratum has a color (duh!)
1350 local colorid
= mesapr
:next(1, #mesa_stratum_colors
)
1352 -- … and a random thickness
1353 local heightrandom
= mesapr
:next(1, 12)
1355 if heightrandom
== 12 then
1357 elseif heightrandom
>= 10 then
1359 elseif heightrandom
>= 8 then
1364 -- Small built-in bias: Only thin strata up to this Y level
1370 stratum(y
, h
, mesa_stratum_colors
[colorid
])
1372 -- Skip a random amount of layers (which won't get painted)
1373 local skiprandom
= mesapr
:next(1, 12)
1375 if skiprandom
== 12 then
1377 elseif skiprandom
>= 10 then
1379 elseif skiprandom
>= 5 then
1381 elseif skiprandom
>= 2 then
1384 -- If this happens, the next stratum will touch the previous one without gap
1388 -- Get height of next stratum or finish
1392 --[[ END OF DANGER ZONE ]]
1395 -- Non-Overworld ores
1396 local function register_dimension_ores()
1398 --[[ NETHER GENERATION ]]
1401 minetest
.register_ore({
1403 ore
= "mcl_nether:soul_sand",
1404 -- Note: Stone is included only for v6 mapgen support. Netherrack is not generated naturally
1405 -- in v6, but instead set with the on_generated function in mcl_mapgen_core.
1406 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1407 clust_scarcity
= 13 * 13 * 13,
1409 y_min
= mcl_vars
.mg_nether_min
,
1410 y_max
= mcl_util
.layer_to_y(64, "nether"),
1411 noise_threshold
= 0.0,
1415 spread
= {x
= 5, y
= 5, z
= 5},
1423 minetest
.register_ore({
1425 ore
= "mcl_nether:magma",
1426 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1427 clust_scarcity
= 8*8*8,
1428 clust_num_ores
= 45,
1430 y_min
= mcl_util
.layer_to_y(23, "nether"),
1431 y_max
= mcl_util
.layer_to_y(37, "nether"),
1433 minetest
.register_ore({
1435 ore
= "mcl_nether:magma",
1436 wherein
= {"mcl_nether:netherrack"},
1437 clust_scarcity
= 10*10*10,
1438 clust_num_ores
= 65,
1440 y_min
= mcl_util
.layer_to_y(23, "nether"),
1441 y_max
= mcl_util
.layer_to_y(37, "nether"),
1445 minetest
.register_ore({
1447 ore
= "mcl_nether:glowstone",
1448 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1449 clust_scarcity
= 26 * 26 * 26,
1451 y_min
= mcl_vars
.mg_lava_nether_max
+ 10,
1452 y_max
= mcl_vars
.mg_nether_max
,
1453 noise_threshold
= 0.0,
1457 spread
= {x
= 5, y
= 5, z
= 5},
1465 minetest
.register_ore({
1467 ore
= "mcl_core:gravel",
1468 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1469 column_height_min
= 1,
1470 column_height_max
= 1,
1471 column_midpoint_factor
= 0,
1472 y_min
= mcl_util
.layer_to_y(63, "nether"),
1473 -- This should be 65, but for some reason with this setting, the sheet ore really stops at 65. o_O
1474 y_max
= mcl_util
.layer_to_y(65+2, "nether"),
1475 noise_threshold
= 0.2,
1479 spread
= {x
= 20, y
= 20, z
= 20},
1487 minetest
.register_ore({
1488 ore_type
= "scatter",
1489 ore
= "mcl_nether:quartz_ore",
1490 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1491 clust_scarcity
= 850,
1492 clust_num_ores
= 4, -- MC cluster amount: 4-10
1494 y_min
= mcl_vars
.mg_nether_min
,
1495 y_max
= mcl_vars
.mg_nether_max
,
1497 minetest
.register_ore({
1498 ore_type
= "scatter",
1499 ore
= "mcl_nether:quartz_ore",
1500 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1501 clust_scarcity
= 1650,
1502 clust_num_ores
= 8, -- MC cluster amount: 4-10
1504 y_min
= mcl_vars
.mg_nether_min
,
1505 y_max
= mcl_vars
.mg_nether_max
,
1508 -- Lava springs in the Nether
1509 minetest
.register_ore({
1510 ore_type
= "scatter",
1511 ore
= "mcl_nether:nether_lava_source",
1512 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1513 clust_scarcity
= 500,
1516 y_min
= mcl_vars
.mg_nether_min
,
1517 y_max
= mcl_vars
.mg_lava_nether_max
+ 1,
1520 minetest
.register_ore({
1521 ore_type
= "scatter",
1522 ore
= "mcl_nether:nether_lava_source",
1523 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1524 clust_scarcity
= 1000,
1527 y_min
= mcl_vars
.mg_lava_nether_max
+ 2,
1528 y_max
= mcl_vars
.mg_lava_nether_max
+ 12,
1531 minetest
.register_ore({
1532 ore_type
= "scatter",
1533 ore
= "mcl_nether:nether_lava_source",
1534 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1535 clust_scarcity
= 2000,
1538 y_min
= mcl_vars
.mg_lava_nether_max
+ 13,
1539 y_max
= mcl_vars
.mg_lava_nether_max
+ 48,
1541 minetest
.register_ore({
1542 ore_type
= "scatter",
1543 ore
= "mcl_nether:nether_lava_source",
1544 wherein
= {"mcl_nether:netherrack", "mcl_core:stone"},
1545 clust_scarcity
= 3500,
1548 y_min
= mcl_vars
.mg_lava_nether_max
+ 49,
1549 y_max
= mcl_vars
.mg_nether_max
,
1554 -- Generate fake End
1555 -- TODO: Remove both "ores" when there's a better End generator
1557 minetest
.register_ore({
1559 ore
= "mcl_end:end_stone",
1561 y_min
= mcl_vars
.mg_end_min
+64,
1562 y_max
= mcl_vars
.mg_end_min
+80,
1563 column_height_min
= 6,
1564 column_height_max
= 7,
1565 column_midpoint_factor
= 0.0,
1569 spread
= {x
=100, y
=100, z
=100},
1574 noise_threshold
= 0,
1577 minetest
.register_ore({
1579 ore
= "mcl_end:end_stone",
1581 y_min
= mcl_vars
.mg_end_min
+64,
1582 y_max
= mcl_vars
.mg_end_min
+80,
1583 column_height_min
= 4,
1584 column_height_max
= 4,
1585 column_midpoint_factor
= 0.0,
1589 spread
= {x
=200, y
=200, z
=200},
1594 noise_threshold
= 0,
1600 -- All mapgens except mgv6
1602 -- Template to register a grass or fern decoration
1603 local function register_grass_decoration(grasstype
, offset
, scale
, biomes
, param2
)
1604 local place_on
, seed
, node
1605 if grasstype
== "fern" then
1606 node
= "mcl_flowers:fern"
1607 place_on
= {"group:grass_block_no_snow", "mcl_core:podzol"}
1609 elseif grasstype
== "tallgrass" then
1610 node
= "mcl_flowers:tallgrass"
1611 place_on
= {"group:grass_block_no_snow"}
1617 spread
= {x
= 200, y
= 200, z
= 200},
1622 minetest
.register_decoration({
1623 deco_type
= "simple",
1624 place_on
= place_on
,
1626 noise_params
= noise
,
1629 y_max
= mcl_vars
.mg_overworld_max
,
1635 local function register_decorations()
1637 minetest
.register_decoration({
1638 deco_type
= "schematic",
1639 place_on
= {"mcl_core:snowblock", "mcl_core:snow", "group:grass_block_snow"},
1644 spread
= {x
= 250, y
= 250, z
= 250},
1649 biomes
= {"IcePlainsSpikes"},
1651 y_max
= mcl_vars
.mg_overworld_max
,
1652 schematic
= minetest
.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_large.mts",
1653 rotation
= "random",
1654 flags
= "place_center_x, place_center_z",
1658 minetest
.register_decoration({
1659 deco_type
= "schematic",
1660 place_on
= {"mcl_core:snowblock", "mcl_core:snow", "group:grass_block_snow"},
1665 spread
= {x
= 250, y
= 250, z
= 250},
1670 biomes
= {"IcePlainsSpikes"},
1672 y_max
= mcl_vars
.mg_overworld_max
,
1673 schematic
= minetest
.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_small.mts",
1674 rotation
= "random",
1675 flags
= "place_center_x, place_center_z",
1681 minetest
.register_decoration({
1682 deco_type
= "schematic",
1683 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
1688 spread
= {x
= 250, y
= 250, z
= 250},
1693 biomes
= {"Forest"},
1695 y_max
= mcl_vars
.mg_overworld_max
,
1696 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_large_"..i
..".mts",
1697 flags
= "place_center_x, place_center_z",
1698 rotation
= "random",
1701 minetest
.register_decoration({
1702 deco_type
= "schematic",
1703 place_on
= {"group:grass_block", "mcl_core:dirt", },
1708 spread
= {x
= 250, y
= 250, z
= 250},
1713 biomes
= {"ExtremeHills", "ExtremeHillsM", "ExtremeHills+", "ExtremeHills+_snowtop"},
1715 y_max
= mcl_vars
.mg_overworld_max
,
1716 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_large_"..i
..".mts",
1717 flags
= "place_center_x, place_center_z",
1718 rotation
= "random",
1721 -- Small “classic” oak (many biomes)
1722 minetest
.register_decoration({
1723 deco_type
= "schematic",
1724 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
1729 spread
= {x
= 250, y
= 250, z
= 250},
1734 biomes
= {"Forest"},
1736 y_max
= mcl_vars
.mg_overworld_max
,
1737 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1738 flags
= "place_center_x, place_center_z",
1739 rotation
= "random",
1741 minetest
.register_decoration({
1742 deco_type
= "schematic",
1743 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
1748 spread
= {x
= 250, y
= 250, z
= 250},
1753 biomes
= {"FlowerForest"},
1755 y_max
= mcl_vars
.mg_overworld_max
,
1756 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1757 flags
= "place_center_x, place_center_z",
1758 rotation
= "random",
1760 minetest
.register_decoration({
1761 deco_type
= "schematic",
1762 place_on
= {"group:grass_block", "mcl_core:dirt", },
1767 spread
= {x
= 250, y
= 250, z
= 250},
1772 biomes
= {"ExtremeHills", "ExtremeHillsM", "ExtremeHills+", "ExtremeHills+_snowtop"},
1774 y_max
= mcl_vars
.mg_overworld_max
,
1775 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1776 flags
= "place_center_x, place_center_z",
1777 rotation
= "random",
1780 minetest
.register_decoration({
1781 deco_type
= "schematic",
1782 place_on
= {"group:grass_block", "mcl_core:dirt"},
1787 spread
= {x
= 250, y
= 250, z
= 250},
1792 biomes
= {"ExtremeHills+", "ExtremeHills+_snowtop"},
1794 y_max
= mcl_vars
.mg_overworld_max
,
1795 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1796 flags
= "place_center_x, place_center_z",
1797 rotation
= "random",
1799 minetest
.register_decoration({
1800 deco_type
= "schematic",
1801 place_on
= {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt"},
1806 spread
= {x
= 250, y
= 250, z
= 250},
1811 biomes
= {"MesaPlateauF_grasstop"},
1813 y_max
= mcl_vars
.mg_overworld_max
,
1814 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1815 flags
= "place_center_x, place_center_z",
1816 rotation
= "random",
1819 minetest
.register_decoration({
1820 deco_type
= "schematic",
1821 place_on
= {"group:grass_block", "mcl_core:dirt", },
1826 spread
= {x
= 250, y
= 250, z
= 250},
1831 biomes
= {"IcePlains"},
1833 y_max
= mcl_vars
.mg_overworld_max
,
1834 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1835 flags
= "place_center_x, place_center_z",
1836 rotation
= "random",
1838 minetest
.register_decoration({
1839 deco_type
= "schematic",
1840 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
1843 biomes
= {"Jungle", "JungleM"},
1845 y_max
= mcl_vars
.mg_overworld_max
,
1846 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1847 flags
= "place_center_x, place_center_z",
1848 rotation
= "random",
1850 minetest
.register_decoration({
1851 deco_type
= "schematic",
1852 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
1854 fill_ratio
= 0.0004,
1855 biomes
= {"JungleEdge", "JungleEdgeM", "Savanna"},
1857 y_max
= mcl_vars
.mg_overworld_max
,
1858 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1859 flags
= "place_center_x, place_center_z",
1860 rotation
= "random",
1865 minetest
.register_decoration({
1866 deco_type
= "schematic",
1867 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
1872 spread
= {x
= 250, y
= 250, z
= 250},
1877 biomes
= {"Forest"},
1879 y_max
= mcl_vars
.mg_overworld_max
,
1880 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_balloon.mts",
1881 flags
= "place_center_x, place_center_z",
1882 rotation
= "random",
1885 minetest
.register_decoration({
1886 deco_type
= "schematic",
1887 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
1892 spread
= {x
= 250, y
= 250, z
= 250},
1897 biomes
= {"Swampland", "Swampland_shore"},
1899 y_max
= mcl_vars
.mg_overworld_max
,
1900 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_oak_swamp.mts",
1901 flags
= "place_center_x, place_center_z",
1902 rotation
= "random",
1907 -- Huge jungle tree (2 variants)
1909 minetest
.register_decoration({
1910 deco_type
= "schematic",
1911 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
1913 fill_ratio
= 0.00125,
1914 biomes
= {"Jungle"},
1916 y_max
= mcl_vars
.mg_overworld_max
,
1917 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree_huge_"..i
..".mts",
1918 flags
= "place_center_x, place_center_z",
1919 rotation
= "random",
1921 minetest
.register_decoration({
1922 deco_type
= "schematic",
1923 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
1926 biomes
= {"JungleM"},
1928 y_max
= mcl_vars
.mg_overworld_max
,
1929 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree_huge_"..i
..".mts",
1930 flags
= "place_center_x, place_center_z",
1931 rotation
= "random",
1935 -- Common jungle tree
1936 minetest
.register_decoration({
1937 deco_type
= "schematic",
1938 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
1941 biomes
= {"Jungle"},
1943 y_max
= mcl_vars
.mg_overworld_max
,
1944 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree.mts",
1945 flags
= "place_center_x, place_center_z",
1946 rotation
= "random",
1948 minetest
.register_decoration({
1949 deco_type
= "schematic",
1950 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
1952 fill_ratio
= 0.0045,
1953 biomes
= {"JungleEdge", "JungleEdgeM"},
1955 y_max
= mcl_vars
.mg_overworld_max
,
1956 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree.mts",
1957 flags
= "place_center_x, place_center_z",
1958 rotation
= "random",
1961 minetest
.register_decoration({
1962 deco_type
= "schematic",
1963 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
1966 biomes
= {"JungleM"},
1968 y_max
= mcl_vars
.mg_overworld_max
,
1969 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree.mts",
1970 flags
= "place_center_x, place_center_z",
1971 rotation
= "random",
1975 local function quick_spruce(seed
, offset
, sprucename
, biomes
, y
)
1979 minetest
.register_decoration({
1980 deco_type
= "schematic",
1981 place_on
= {"group:grass_block", "mcl_core:dirt", "mcl_core:podzol"},
1986 spread
= {x
= 250, y
= 250, z
= 250},
1993 y_max
= mcl_vars
.mg_overworld_max
,
1994 schematic
= minetest
.get_modpath("mcl_core").."/schematics/"..sprucename
,
1995 flags
= "place_center_x, place_center_z",
2000 quick_spruce(3000, 0.005, "mcl_core_spruce_huge_1.mts", {"MegaSpruceTaiga"})
2001 quick_spruce(4000, 0.005, "mcl_core_spruce_huge_2.mts", {"MegaSpruceTaiga"})
2002 quick_spruce(6000, 0.005, "mcl_core_spruce_huge_3.mts", {"MegaSpruceTaiga"})
2004 quick_spruce(3000, 0.0008, "mcl_core_spruce_huge_up_1.mts", {"MegaTaiga"})
2005 quick_spruce(4000, 0.0008, "mcl_core_spruce_huge_up_2.mts", {"MegaTaiga"})
2006 quick_spruce(6000, 0.0008, "mcl_core_spruce_huge_up_3.mts", {"MegaTaiga"})
2010 quick_spruce(11000, 0.00150, "mcl_core_spruce_5.mts", {"Taiga", "ColdTaiga"})
2012 quick_spruce(2500, 0.00325, "mcl_core_spruce_1.mts", {"MegaSpruceTaiga", "MegaTaiga", "Taiga", "ColdTaiga"})
2013 quick_spruce(7000, 0.00425, "mcl_core_spruce_3.mts", {"MegaSpruceTaiga", "MegaTaiga", "Taiga", "ColdTaiga"})
2014 quick_spruce(9000, 0.00325, "mcl_core_spruce_4.mts", {"MegaTaiga", "Taiga", "ColdTaiga"})
2016 quick_spruce(9500, 0.00500, "mcl_core_spruce_tall.mts", {"MegaTaiga"})
2018 quick_spruce(5000, 0.00250, "mcl_core_spruce_2.mts", {"MegaSpruceTaiga", "MegaTaiga"})
2020 quick_spruce(11000, 0.000025, "mcl_core_spruce_5.mts", {"ExtremeHills", "ExtremeHillsM"})
2021 quick_spruce(2500, 0.00005, "mcl_core_spruce_1.mts", {"ExtremeHills", "ExtremeHillsM"})
2022 quick_spruce(7000, 0.00005, "mcl_core_spruce_3.mts", {"ExtremeHills", "ExtremeHillsM"})
2023 quick_spruce(9000, 0.00005, "mcl_core_spruce_4.mts", {"ExtremeHills", "ExtremeHillsM"})
2025 quick_spruce(11000, 0.001, "mcl_core_spruce_5.mts", {"ExtremeHills+", "ExtremeHills+_snowtop"}, 50)
2026 quick_spruce(2500, 0.002, "mcl_core_spruce_1.mts", {"ExtremeHills+", "ExtremeHills+_snowtop"}, 50)
2027 quick_spruce(7000, 0.003, "mcl_core_spruce_3.mts", {"ExtremeHills+", "ExtremeHills+_snowtop"}, 50)
2028 quick_spruce(9000, 0.002, "mcl_core_spruce_4.mts", {"ExtremeHills+", "ExtremeHills+_snowtop"}, 50)
2031 -- Small lollipop spruce
2032 minetest
.register_decoration({
2033 deco_type
= "schematic",
2034 place_on
= {"group:grass_block", "mcl_core:podzol"},
2039 spread
= {x
= 250, y
= 250, z
= 250},
2044 biomes
= {"Taiga", "ColdTaiga"},
2046 y_max
= mcl_vars
.mg_overworld_max
,
2047 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_spruce_lollipop.mts",
2048 flags
= "place_center_x, place_center_z",
2051 -- Matchstick spruce: Very few leaves, tall trunk
2052 minetest
.register_decoration({
2053 deco_type
= "schematic",
2054 place_on
= {"group:grass_block", "mcl_core:podzol"},
2059 spread
= {x
= 250, y
= 250, z
= 250},
2064 biomes
= {"Taiga", "ColdTaiga"},
2066 y_max
= mcl_vars
.mg_overworld_max
,
2067 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_spruce_matchstick.mts",
2068 flags
= "place_center_x, place_center_z",
2071 -- Rare spruce in Ice Plains
2072 minetest
.register_decoration({
2073 deco_type
= "schematic",
2074 place_on
= {"group:grass_block"},
2079 spread
= {x
= 250, y
= 250, z
= 250},
2084 biomes
= {"IcePlains"},
2086 y_max
= mcl_vars
.mg_overworld_max
,
2087 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_spruce_5.mts",
2088 flags
= "place_center_x, place_center_z",
2091 -- Acacia (many variants)
2093 minetest
.register_decoration({
2094 deco_type
= "schematic",
2095 place_on
= {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt", "mcl_core:coarse_dirt"},
2097 fill_ratio
= 0.0002,
2098 biomes
= {"Savanna", "SavannaM"},
2100 y_max
= mcl_vars
.mg_overworld_max
,
2101 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_acacia_"..a
..".mts",
2102 flags
= "place_center_x, place_center_z",
2103 rotation
= "random",
2108 minetest
.register_decoration({
2109 deco_type
= "schematic",
2110 place_on
= {"group:grass_block_no_snow"},
2115 spread
= {x
= 250, y
= 250, z
= 250},
2120 biomes
= {"BirchForest"},
2122 y_max
= mcl_vars
.mg_overworld_max
,
2123 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_birch.mts",
2124 flags
= "place_center_x, place_center_z",
2126 minetest
.register_decoration({
2127 deco_type
= "schematic",
2128 place_on
= {"group:grass_block_no_snow"},
2133 spread
= {x
= 250, y
= 250, z
= 250},
2138 biomes
= {"BirchForestM"},
2140 y_max
= mcl_vars
.mg_overworld_max
,
2141 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_birch_tall.mts",
2142 flags
= "place_center_x, place_center_z",
2145 minetest
.register_decoration({
2146 deco_type
= "schematic",
2147 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
2152 spread
= {x
= 250, y
= 250, z
= 250},
2157 biomes
= {"Forest", "FlowerForest"},
2159 y_max
= mcl_vars
.mg_overworld_max
,
2160 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_birch.mts",
2161 flags
= "place_center_x, place_center_z",
2165 minetest
.register_decoration({
2166 deco_type
= "schematic",
2167 place_on
= {"group:grass_block_no_snow"},
2172 spread
= {x
= 125, y
= 125, z
= 125},
2177 biomes
= {"RoofedForest"},
2179 y_max
= mcl_vars
.mg_overworld_max
,
2180 schematic
= minetest
.get_modpath("mcl_core").."/schematics/mcl_core_dark_oak.mts",
2181 flags
= "place_center_x, place_center_z",
2182 rotation
= "random",
2186 local ratio_mushroom
= 0.0001
2187 local ratio_mushroom_huge
= ratio_mushroom
* (11/12)
2188 local ratio_mushroom_giant
= ratio_mushroom
* (1/12)
2189 local ratio_mushroom_mycelium
= 0.002
2190 local ratio_mushroom_mycelium_huge
= ratio_mushroom_mycelium
* (11/12)
2191 local ratio_mushroom_mycelium_giant
= ratio_mushroom_mycelium
* (1/12)
2193 -- Huge Brown Mushroom
2194 minetest
.register_decoration({
2195 deco_type
= "schematic",
2196 place_on
= { "group:grass_block_no_snow", "mcl_core:dirt" },
2198 fill_ratio
= ratio_mushroom_huge
,
2199 biomes
= { "RoofedForest" },
2201 y_max
= mcl_vars
.mg_overworld_max
,
2202 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts",
2203 flags
= "place_center_x, place_center_z",
2204 rotation
= "random",
2206 minetest
.register_decoration({
2207 deco_type
= "schematic",
2208 place_on
= { "group:grass_block_no_snow", "mcl_core:dirt" },
2210 fill_ratio
= ratio_mushroom_giant
,
2211 biomes
= { "RoofedForest" },
2213 y_max
= mcl_vars
.mg_overworld_max
,
2214 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_brown.mts",
2215 flags
= "place_center_x, place_center_z",
2216 rotation
= "random",
2219 minetest
.register_decoration({
2220 deco_type
= "schematic",
2221 place_on
= { "mcl_core:mycelium" },
2223 fill_ratio
= ratio_mushroom_mycelium_huge
,
2224 biomes
= { "MushroomIsland", "MushroomIslandShore" },
2226 y_max
= mcl_vars
.mg_overworld_max
,
2227 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts",
2228 flags
= "place_center_x, place_center_z",
2229 rotation
= "random",
2231 minetest
.register_decoration({
2232 deco_type
= "schematic",
2233 place_on
= { "mcl_core:mycelium" },
2235 fill_ratio
= ratio_mushroom_mycelium_giant
,
2236 biomes
= { "MushroomIsland", "MushroomIslandShore" },
2238 y_max
= mcl_vars
.mg_overworld_max
,
2239 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_brown.mts",
2240 flags
= "place_center_x, place_center_z",
2241 rotation
= "random",
2244 -- Huge Red Mushroom
2245 minetest
.register_decoration({
2246 deco_type
= "schematic",
2247 place_on
= { "group:grass_block_no_snow", "mcl_core:dirt" },
2249 fill_ratio
= ratio_mushroom_huge
,
2250 biomes
= { "RoofedForest" },
2252 y_max
= mcl_vars
.mg_overworld_max
,
2253 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts",
2254 flags
= "place_center_x, place_center_z",
2255 rotation
= "random",
2257 minetest
.register_decoration({
2258 deco_type
= "schematic",
2259 place_on
= { "group:grass_block_no_snow", "mcl_core:dirt" },
2261 fill_ratio
= ratio_mushroom_giant
,
2262 biomes
= { "RoofedForest" },
2264 y_max
= mcl_vars
.mg_overworld_max
,
2265 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_red.mts",
2266 flags
= "place_center_x, place_center_z",
2267 rotation
= "random",
2270 minetest
.register_decoration({
2271 deco_type
= "schematic",
2272 place_on
= { "mcl_core:mycelium" },
2274 fill_ratio
= ratio_mushroom_mycelium_huge
,
2275 biomes
= { "MushroomIsland", "MushroomIslandShore" },
2277 y_max
= mcl_vars
.mg_overworld_max
,
2278 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts",
2279 flags
= "place_center_x, place_center_z",
2280 rotation
= "random",
2282 minetest
.register_decoration({
2283 deco_type
= "schematic",
2284 place_on
= { "mcl_core:mycelium" },
2286 fill_ratio
= ratio_mushroom_mycelium_giant
,
2287 biomes
= { "MushroomIsland", "MushroomIslandShore" },
2289 y_max
= mcl_vars
.mg_overworld_max
,
2290 schematic
= minetest
.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_red.mts",
2291 flags
= "place_center_x, place_center_z",
2292 rotation
= "random",
2295 -- Moss stone boulder (3×3)
2296 minetest
.register_decoration({
2297 deco_type
= "schematic",
2298 place_on
= {"mcl_core:podzol", "mcl_core:dirt", "mcl_core:coarse_dirt"},
2303 spread
= {x
= 300, y
= 300, z
= 300},
2308 biomes
= {"MegaTaiga", "MegaSpruceTaiga"},
2310 y_max
= mcl_vars
.mg_overworld_max
,
2311 schematic
= minetest
.get_modpath("mcl_structures").."/schematics/mcl_structures_boulder.mts",
2312 flags
= "place_center_x, place_center_z",
2315 -- Small moss stone boulder (2×2)
2316 minetest
.register_decoration({
2317 deco_type
= "schematic",
2318 place_on
= {"mcl_core:podzol", "mcl_core:dirt", "mcl_core:coarse_dirt"},
2323 spread
= {x
= 300, y
= 300, z
= 300},
2328 biomes
= {"MegaTaiga", "MegaSpruceTaiga"},
2330 y_max
= mcl_vars
.mg_overworld_max
,
2331 schematic
= minetest
.get_modpath("mcl_structures").."/schematics/mcl_structures_boulder_small.mts",
2332 flags
= "place_center_x, place_center_z",
2336 minetest
.register_decoration({
2337 deco_type
= "simple",
2338 place_on
= {"group:sand"},
2343 spread
= {x
= 100, y
= 100, z
= 100},
2349 y_max
= mcl_vars
.mg_overworld_max
,
2350 decoration
= "mcl_core:cactus",
2351 biomes
= {"Desert","Mesa","Mesa_sandlevel","MesaPlateauF","MesaPlateauF_sandlevel"},
2357 minetest
.register_decoration({
2358 deco_type
= "simple",
2359 place_on
= {"mcl_core:dirt", "mcl_core:coarse_dirt", "group:grass_block_no_snow", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
2364 spread
= {x
= 200, y
= 200, z
= 200},
2370 y_max
= mcl_vars
.mg_overworld_max
,
2371 decoration
= "mcl_core:reeds",
2374 spawn_by
= { "mcl_core:water_source", "group:frosted_ice" },
2377 minetest
.register_decoration({
2378 deco_type
= "simple",
2379 place_on
= {"mcl_core:dirt", "mcl_core:coarse_dirt", "group:grass_block_no_snow", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
2384 spread
= {x
= 200, y
= 200, z
= 200},
2389 biomes
= {"Swampland", "Swampland_shore"},
2391 y_max
= mcl_vars
.mg_overworld_max
,
2392 decoration
= "mcl_core:reeds",
2395 spawn_by
= { "mcl_core:water_source", "group:frosted_ice" },
2399 local dry_index
= minetest
.registered_nodes
["mcl_core:dirt_with_dry_grass"]._mcl_grass_palette_index
2402 local register_doubletall_grass
= function(offset
, scale
, biomes
, param2
)
2404 minetest
.register_decoration({
2405 deco_type
= "schematic",
2407 size
= { x
=1, y
=3, z
=1 },
2409 { name
= "air", prob
= 0 },
2410 { name
= "mcl_flowers:double_grass", param1
=255, param2
=param2
},
2411 { name
= "mcl_flowers:double_grass_top", param1
=255, param2
=param2
},
2415 ["mcl_flowers:tallgrass"] = "mcl_flowers:double_grass",
2417 place_on
= {"group:grass_block_no_snow"},
2422 spread
= {x
= 200, y
= 200, z
= 200},
2428 y_max
= mcl_vars
.mg_overworld_max
,
2433 register_doubletall_grass(-0.01, 0.03, {"Taiga", "Forest", "FlowerForest", "BirchForest", "BirchForestM", "RoofedForest"})
2434 register_doubletall_grass(-0.002, 0.03, {"Plains", "SunflowerPlains"})
2435 register_doubletall_grass(-0.0005, -0.03, {"Savanna", "SavannaM"}, dry_index
)
2438 local register_double_fern
= function(offset
, scale
, biomes
)
2439 minetest
.register_decoration({
2440 deco_type
= "schematic",
2442 size
= { x
=1, y
=3, z
=1 },
2444 { name
= "air", prob
= 0 },
2445 { name
= "mcl_flowers:double_fern", param1
=255, },
2446 { name
= "mcl_flowers:double_fern_top", param1
=255, },
2450 ["mcl_flowers:fern"] = "mcl_flowers:double_fern"
2452 place_on
= {"group:grass_block_no_snow", "mcl_core:podzol"},
2457 spread
= {x
= 250, y
= 250, z
= 250},
2464 y_max
= mcl_vars
.mg_overworld_max
,
2468 register_double_fern(0.01, 0.03, { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "ColdTaiga", "MegaTaiga", "MegaSpruceTaiga" })
2469 register_double_fern(0.15, 0.1, { "JungleM" })
2472 local register_large_flower
= function(name
, biomes
, seed
, offset
, flower_forest_offset
)
2474 if flower_forest_offset
then
2480 local o
, b
-- offset, biomes
2485 o
= flower_forest_offset
2486 b
= { "FlowerForest" }
2489 minetest
.register_decoration({
2490 deco_type
= "schematic",
2492 size
= { x
=1, y
=3, z
=1 },
2494 { name
= "air", prob
= 0 },
2495 { name
= "mcl_flowers:"..name
, param1
=255, },
2496 { name
= "mcl_flowers:"..name
.."_top", param1
=255, },
2499 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
2505 spread
= {x
= 300, y
= 300, z
= 300},
2511 y_max
= mcl_vars
.mg_overworld_max
,
2518 register_large_flower("rose_bush", {"Forest"}, 9350, -0.008, 0.003)
2519 register_large_flower("peony", {"Forest"}, 10450, -0.008, 0.003)
2520 register_large_flower("lilac", {"Forest"}, 10600, -0.007, 0.003)
2521 register_large_flower("sunflower", {"SunflowerPlains"}, 2940, 0.01)
2525 minetest
.register_decoration({
2526 deco_type
= "schematic",
2527 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
2532 spread
= {x
= 250, y
= 250, z
= 250},
2537 biomes
= {"Jungle"},
2539 y_max
= mcl_vars
.mg_overworld_max
,
2540 schematic
= jungle_bush_schematic
,
2541 flags
= "place_center_x, place_center_z",
2543 minetest
.register_decoration({
2544 deco_type
= "schematic",
2545 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
2550 spread
= {x
= 250, y
= 250, z
= 250},
2555 biomes
= {"JungleM"},
2557 y_max
= mcl_vars
.mg_overworld_max
,
2558 schematic
= jungle_bush_schematic
,
2559 flags
= "place_center_x, place_center_z",
2561 minetest
.register_decoration({
2562 deco_type
= "schematic",
2563 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
2568 spread
= {x
= 250, y
= 250, z
= 250},
2573 biomes
= {"JungleEdge", "JungleEdgeM"},
2575 y_max
= mcl_vars
.mg_overworld_max
,
2576 schematic
= jungle_bush_schematic
,
2577 flags
= "place_center_x, place_center_z",
2581 -- These fallen logs are not really good yet. They must be longer and also have one upright block.
2582 -- Note the decortion API does not like wide schematics, they are likely to overhang.
2583 if generate_fallen_logs
then
2584 minetest
.register_decoration({
2585 deco_type
= "schematic",
2586 place_on
= {"group:grass_block_no_snow", "mcl_core:podzol", "mcl_core:coarse_dirt"},
2591 spread
= {x
= 250, y
= 250, z
= 250},
2596 biomes
= {"MegaTaiga", "MegaSpruceTaiga", "Taiga"},
2598 y_max
= mcl_vars
.mg_overworld_max
,
2600 size
= {x
= 3, y
= 3, z
= 1},
2602 {name
= "air", prob
= 0},
2603 {name
= "air", prob
= 0},
2604 {name
= "air", prob
= 0},
2605 {name
= "mcl_core:sprucetree", param2
= 12, prob
= 127},
2606 {name
= "mcl_core:sprucetree", param2
= 12},
2607 {name
= "mcl_core:sprucetree", param2
= 12},
2608 {name
= "air", prob
= 0},
2609 {name
= "mcl_mushrooms:mushroom_brown", prob
= 160},
2610 {name
= "mcl_mushrooms:mushroom_red", prob
= 160},
2613 flags
= "place_center_x",
2614 rotation
= "random",
2617 minetest
.register_decoration({
2618 deco_type
= "schematic",
2619 place_on
= {"group:grass_block", "mcl_core:podzol", "mcl_core:podzol_snow", "mcl_core:coarse_dirt"},
2624 spread
= {x
= 250, y
= 250, z
= 250},
2629 biomes
= {"ColdTaiga"},
2631 y_max
= mcl_vars
.mg_overworld_max
,
2633 size
= {x
= 3, y
= 3, z
= 1},
2635 {name
= "air", prob
= 0},
2636 {name
= "air", prob
= 0},
2637 {name
= "air", prob
= 0},
2638 {name
= "mcl_core:sprucetree", param2
= 12, prob
= 127},
2639 {name
= "mcl_core:sprucetree", param2
= 12},
2640 {name
= "mcl_core:sprucetree", param2
= 12},
2641 {name
= "air", prob
= 0},
2642 {name
= "air", prob
= 0},
2643 {name
= "air", prob
= 0},
2646 flags
= "place_center_x",
2647 rotation
= "random",
2650 minetest
.register_decoration({
2651 deco_type
= "schematic",
2652 place_on
= {"group:grass_block_no_snow"},
2657 spread
= {x
= 250, y
= 250, z
= 250},
2662 biomes
= {"BirchForest", "BirchForestM",},
2664 y_max
= mcl_vars
.mg_overworld_max
,
2666 size
= {x
= 3, y
= 3, z
= 1},
2668 {name
= "air", prob
= 0},
2669 {name
= "air", prob
= 0},
2670 {name
= "air", prob
= 0},
2671 {name
= "mcl_core:birchtree", param2
= 12},
2672 {name
= "mcl_core:birchtree", param2
= 12},
2673 {name
= "mcl_core:birchtree", param2
= 12, prob
= 127},
2674 {name
= "mcl_mushrooms:mushroom_red", prob
= 100},
2675 {name
= "mcl_mushrooms:mushroom_brown", prob
= 10},
2676 {name
= "air", prob
= 0},
2679 flags
= "place_center_x",
2680 rotation
= "random",
2683 minetest
.register_decoration({
2684 deco_type
= "schematic",
2685 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
2688 biomes
= {"Jungle", "JungleM"},
2690 y_max
= mcl_vars
.mg_overworld_max
,
2692 size
= {x
= 3, y
= 3, z
= 1},
2694 {name
= "air", prob
= 0},
2695 {name
= "air", prob
= 0},
2696 {name
= "air", prob
= 0},
2697 {name
= "mcl_core:jungletree", param2
= 12},
2698 {name
= "mcl_core:jungletree", param2
= 12},
2699 {name
= "mcl_core:jungletree", param2
= 12, prob
= 127},
2700 {name
= "air", prob
= 0},
2701 {name
= "mcl_mushrooms:mushroom_brown", prob
= 50},
2702 {name
= "air", prob
= 0},
2705 flags
= "place_center_x",
2706 rotation
= "random",
2709 minetest
.register_decoration({
2710 deco_type
= "schematic",
2711 place_on
= {"group:grass_block_no_snow"},
2716 spread
= {x
= 250, y
= 250, z
= 250},
2721 biomes
= {"Forest"},
2723 y_max
= mcl_vars
.mg_overworld_max
,
2725 size
= {x
= 3, y
= 3, z
= 1},
2727 {name
= "air", prob
= 0},
2728 {name
= "air", prob
= 0},
2729 {name
= "air", prob
= 0},
2730 {name
= "mcl_core:tree", param2
= 12, prob
= 127},
2731 {name
= "mcl_core:tree", param2
= 12},
2732 {name
= "mcl_core:tree", param2
= 12},
2733 {name
= "air", prob
= 0},
2734 {name
= "mcl_mushrooms:mushroom_brown", prob
= 96},
2735 {name
= "mcl_mushrooms:mushroom_red", prob
= 96},
2738 flags
= "place_center_x",
2739 rotation
= "random",
2745 local lily_schem
= {
2746 { name
= "mcl_core:water_source" },
2747 { name
= "mcl_flowers:waterlily" },
2750 -- Spawn them in shallow water at ocean level in Swampland.
2751 -- Tweak lilydepth to change the maximum water depth
2754 for d
=1, lilydepth
do
2755 local height
= d
+ 2
2757 table.insert(lily_schem
, 1, { name
= "air", prob
= 0 })
2759 minetest
.register_decoration({
2760 deco_type
= "schematic",
2762 size
= { x
=1, y
=height
, z
=1 },
2765 place_on
= "mcl_core:dirt",
2770 spread
= {x
= 100, y
= 100, z
= 100},
2777 biomes
= { "Swampland_shore" },
2778 rotation
= "random",
2783 minetest
.register_decoration({
2784 deco_type
= "simple",
2785 place_on
= {"group:grass_block_no_snow"},
2790 spread
= {x
= 250, y
= 250, z
= 250},
2796 y_max
= mcl_vars
.mg_overworld_max
,
2797 decoration
= "mcl_farming:melon",
2798 biomes
= { "Jungle" },
2800 minetest
.register_decoration({
2801 deco_type
= "simple",
2802 place_on
= {"group:grass_block_no_snow"},
2807 spread
= {x
= 250, y
= 250, z
= 250},
2813 y_max
= mcl_vars
.mg_overworld_max
,
2814 decoration
= "mcl_farming:melon",
2815 biomes
= { "JungleM" },
2817 minetest
.register_decoration({
2818 deco_type
= "simple",
2819 place_on
= {"group:grass_block_no_snow"},
2824 spread
= {x
= 250, y
= 250, z
= 250},
2830 y_max
= mcl_vars
.mg_overworld_max
,
2831 decoration
= "mcl_farming:melon",
2832 biomes
= { "JungleEdge", "JungleEdgeM" },
2835 -- Lots of melons in Jungle Edge M
2836 minetest
.register_decoration({
2837 deco_type
= "simple",
2838 place_on
= {"group:grass_block_no_snow"},
2843 spread
= {x
= 125, y
= 125, z
= 125},
2849 y_max
= mcl_vars
.mg_overworld_max
,
2850 decoration
= "mcl_farming:melon",
2851 biomes
= { "JungleEdgeM" },
2855 minetest
.register_decoration({
2856 deco_type
= "schematic",
2858 size
= { x
=1, y
=2, z
=1 },
2860 { name
= "air", prob
= 0 },
2861 { name
= "mcl_farming:pumpkin_face", param1
=255, },
2864 place_on
= {"group:grass_block_no_snow"},
2869 spread
= {x
= 125, y
= 125, z
= 125},
2875 y_max
= mcl_vars
.mg_overworld_max
,
2876 rotation
= "random",
2879 -- Grasses and ferns
2880 local grass_forest
= {"Plains", "Taiga", "Forest", "FlowerForest", "BirchForest", "BirchForestM", "RoofedForest", "Swampland", }
2881 local grass_mpf
= {"MesaPlateauF_grasstop"}
2882 local grass_plains
= {"Plains", "SunflowerPlains", "JungleEdge", "JungleEdgeM" }
2883 local grass_savanna
= {"Savanna", "SavannaM"}
2884 local grass_sparse
= {"ExtremeHills", "ExtremeHills+", "ExtremeHills+_snowtop", "ExtremeHillsM", "Jungle", }
2886 register_grass_decoration("tallgrass", -0.03, 0.09, grass_forest
)
2887 register_grass_decoration("tallgrass", -0.015, 0.075, grass_forest
)
2888 register_grass_decoration("tallgrass", 0, 0.06, grass_forest
)
2889 register_grass_decoration("tallgrass", 0.015, 0.045, grass_forest
)
2890 register_grass_decoration("tallgrass", 0.03, 0.03, grass_forest
)
2891 register_grass_decoration("tallgrass", -0.03, 0.09, grass_mpf
, dry_index
)
2892 register_grass_decoration("tallgrass", -0.015, 0.075, grass_mpf
, dry_index
)
2893 register_grass_decoration("tallgrass", 0, 0.06, grass_mpf
, dry_index
)
2894 register_grass_decoration("tallgrass", 0.01, 0.045, grass_mpf
, dry_index
)
2895 register_grass_decoration("tallgrass", 0.01, 0.05, grass_forest
)
2896 register_grass_decoration("tallgrass", 0.03, 0.03, grass_plains
)
2897 register_grass_decoration("tallgrass", 0.05, 0.01, grass_plains
)
2898 register_grass_decoration("tallgrass", 0.07, -0.01, grass_plains
)
2899 register_grass_decoration("tallgrass", 0.09, -0.03, grass_plains
)
2900 register_grass_decoration("tallgrass", 0.18, -0.03, grass_savanna
, dry_index
)
2901 register_grass_decoration("tallgrass", 0.05, -0.03, grass_sparse
)
2903 local fern_minimal
= { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga", "ColdTaiga" }
2904 local fern_low
= { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Taiga", "MegaTaiga", "MegaSpruceTaiga" }
2905 local fern_Jungle
= { "Jungle", "JungleM", "JungleEdge", "JungleEdgeM" }
2906 local fern_JungleM
= { "JungleM" },
2907 register_grass_decoration("fern", -0.03, 0.09, fern_minimal
)
2908 register_grass_decoration("fern", -0.015, 0.075, fern_minimal
)
2909 register_grass_decoration("fern", 0, 0.06, fern_minimal
)
2910 register_grass_decoration("fern", 0.015, 0.045, fern_low
)
2911 register_grass_decoration("fern", 0.03, 0.03, fern_low
)
2912 register_grass_decoration("fern", 0.01, 0.05, fern_Jungle
)
2913 register_grass_decoration("fern", 0.03, 0.03, fern_Jungle
)
2914 register_grass_decoration("fern", 0.05, 0.01, fern_Jungle
)
2915 register_grass_decoration("fern", 0.07, -0.01, fern_Jungle
)
2916 register_grass_decoration("fern", 0.09, -0.03, fern_Jungle
)
2917 register_grass_decoration("fern", 0.12, -0.03, fern_JungleM
)
2919 -- Place tall grass on snow in Ice Plains and Extreme Hills+
2920 minetest
.register_decoration({
2921 deco_type
= "schematic",
2922 place_on
= {"group:grass_block"},
2927 spread
= {x
= 15, y
= 15, z
= 15},
2932 biomes
= {"IcePlains"},
2934 y_max
= mcl_vars
.mg_overworld_max
,
2936 size
= { x
=1, y
=2, z
=1 },
2938 { name
= "mcl_core:dirt_with_grass", force_place
=true, },
2939 { name
= "mcl_flowers:tallgrass", },
2943 minetest
.register_decoration({
2944 deco_type
= "schematic",
2945 place_on
= {"group:grass_block"},
2950 spread
= {x
= 15, y
= 15, z
= 15},
2955 biomes
= {"ExtremeHills+_snowtop"},
2957 y_max
= mcl_vars
.mg_overworld_max
,
2959 size
= { x
=1, y
=2, z
=1 },
2961 { name
= "mcl_core:dirt_with_grass", force_place
=true, },
2962 { name
= "mcl_flowers:tallgrass", },
2969 minetest
.register_decoration({
2970 deco_type
= "simple",
2971 place_on
= {"group:sand", "mcl_core:podzol", "mcl_core:dirt", "mcl_core:dirt_with_dry_grass", "mcl_core:coarse_dirt", "group:hardened_clay"},
2976 spread
= {x
= 100, y
= 100, z
= 100},
2982 y_max
= mcl_vars
.mg_overworld_max
,
2983 biomes
= {"Desert", "Mesa", "Mesa_sandlevel", "MesaPlateauF", "MesaPlateauF_sandlevel", "MesaPlateauF_grasstop", "Taiga", "MegaTaiga"},
2984 decoration
= "mcl_core:deadbush",
2988 -- Mushrooms in mushroom biome
2989 minetest
.register_decoration({
2990 deco_type
= "simple",
2991 place_on
= {"mcl_core:mycelium"},
2994 biomes
= {"MushroomIsland", "MushroomIslandShore"},
2995 noise_threshold
= 2.0,
2996 y_min
= mcl_vars
.mg_overworld_min
,
2997 y_max
= mcl_vars
.mg_overworld_max
,
2998 decoration
= "mcl_mushrooms:mushroom_red",
3000 minetest
.register_decoration({
3001 deco_type
= "simple",
3002 place_on
= {"mcl_core:mycelium"},
3005 biomes
= {"MushroomIsland", "MushroomIslandShore"},
3006 y_min
= mcl_vars
.mg_overworld_min
,
3007 y_max
= mcl_vars
.mg_overworld_max
,
3008 decoration
= "mcl_mushrooms:mushroom_brown",
3011 -- Mushrooms in Taiga
3012 minetest
.register_decoration({
3013 deco_type
= "simple",
3014 place_on
= {"mcl_core:podzol"},
3017 biomes
= {"Taiga", "MegaTaiga", "MegaSpruceTaiga"},
3018 y_min
= mcl_vars
.mg_overworld_min
,
3019 y_max
= mcl_vars
.mg_overworld_max
,
3020 decoration
= "mcl_mushrooms:mushroom_red",
3022 minetest
.register_decoration({
3023 deco_type
= "simple",
3024 place_on
= {"mcl_core:podzol"},
3027 biomes
= {"Taiga", "MegaTaiga", "MegaSpruceTaiga"},
3028 y_min
= mcl_vars
.mg_overworld_min
,
3029 y_max
= mcl_vars
.mg_overworld_max
,
3030 decoration
= "mcl_mushrooms:mushroom_brown",
3034 -- Mushrooms next to trees
3035 local mushrooms
= {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}
3036 local mseeds
= { 7133, 8244 }
3037 for m
=1, #mushrooms
do
3038 -- Mushrooms next to trees
3039 minetest
.register_decoration({
3040 deco_type
= "simple",
3041 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
3046 spread
= {x
= 250, y
= 250, z
= 250},
3052 y_max
= mcl_vars
.mg_overworld_max
,
3053 decoration
= mushrooms
[m
],
3054 spawn_by
= { "mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree" },
3058 -- More mushrooms in Swampland
3059 minetest
.register_decoration({
3060 deco_type
= "simple",
3061 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
3066 spread
= {x
= 250, y
= 250, z
= 250},
3072 y_max
= mcl_vars
.mg_overworld_max
,
3073 decoration
= mushrooms
[m
],
3074 biomes
= { "Swampland"},
3075 spawn_by
= { "mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree" },
3079 local function register_flower(name
, biomes
, seed
, is_in_flower_forest
)
3080 if is_in_flower_forest
== nil then
3081 is_in_flower_forest
= true
3084 minetest
.register_decoration({
3085 deco_type
= "simple",
3086 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
3091 spread
= {x
= 100, y
= 100, z
= 100},
3097 y_max
= mcl_vars
.mg_overworld_max
,
3099 decoration
= "mcl_flowers:"..name
,
3102 if is_in_flower_forest
then
3103 minetest
.register_decoration({
3104 deco_type
= "simple",
3105 place_on
= {"group:grass_block_no_snow", "mcl_core:dirt"},
3110 spread
= {x
= 100, y
= 100, z
= 100},
3116 y_max
= mcl_vars
.mg_overworld_max
,
3117 biomes
= {"FlowerForest"},
3118 decoration
= "mcl_flowers:"..name
,
3123 local flower_biomes1
= {"Plains", "SunflowerPlains", "RoofedForest", "Forest", "BirchForest", "BirchForestM", "Taiga", "ColdTaiga", "Jungle", "JungleM", "JungleEdge", "JungleEdgeM", "Savanna", "SavannaM", "ExtremeHills", "ExtremeHillsM", "ExtremeHills+", "ExtremeHills+_snowtop" }
3125 register_flower("dandelion", flower_biomes1
, 8)
3126 register_flower("poppy", flower_biomes1
, 9439)
3128 local flower_biomes2
= {"Plains", "SunflowerPlains"}
3129 register_flower("tulip_red", flower_biomes2
, 436)
3130 register_flower("tulip_orange", flower_biomes2
, 536)
3131 register_flower("tulip_pink", flower_biomes2
, 636)
3132 register_flower("tulip_white", flower_biomes2
, 736)
3133 register_flower("azure_bluet", flower_biomes2
, 800)
3134 register_flower("oxeye_daisy", flower_biomes2
, 3490)
3136 register_flower("allium", nil, 0) -- flower Forest only
3137 register_flower("blue_orchid", {"Swampland"}, 64500, false)
3141 -- Decorations in non-Overworld dimensions
3142 local function register_dimension_decorations()
3147 -- Detect mapgen to select functions
3149 if mg_name
~= "singlenode" then
3150 minetest
.clear_registered_biomes()
3151 minetest
.clear_registered_decorations()
3152 minetest
.clear_registered_schematics()
3153 if mg_name
~= "v6" and mg_name
~= "flat" then
3155 register_biomelike_ores()
3156 register_decorations()
3157 elseif mg_name
== "flat" then
3158 -- Implementation of Minecraft's Superflat mapgen, classic style
3159 minetest
.clear_registered_biomes()
3160 minetest
.clear_registered_decorations()
3161 minetest
.clear_registered_schematics()
3162 register_classic_superflat_biome()
3165 -- Non-overworld stuff is registered independently
3166 register_dimension_biomes()
3167 register_dimension_ores()
3168 register_dimension_decorations()
3170 -- Overworld decorations for v6 are handled in mcl_mapgen_core