Use hardware coloring for tallgrass and friends
[MineClone/MineClone2.git] / mods / MAPGEN / mcl_biomes / init.lua
blob67721984d562ec2a3c20e58b653d4cb1e6a311df
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"
15 end
18 -- Register biomes
21 local function register_classic_superflat_biome()
22 -- Classic Superflat: bedrock (not part of biome), 2 dirt, 1 grass block
23 minetest.register_biome({
24 name = "flat",
25 node_top = "mcl_core:dirt_with_grass",
26 depth_top = 1,
27 node_filler = "mcl_core:dirt",
28 depth_filler = 3,
29 node_stone = "mcl_core:dirt",
30 y_min = mcl_vars.mg_overworld_min - 512,
31 y_max = mcl_vars.mg_overworld_max,
32 humidity_point = 50,
33 heat_point = 50,
35 end
37 -- All mapgens except mgv6, flat and singlenode
38 local function register_biomes()
39 --[[ OVERWORLD ]]
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
45 (except height).
46 MC has many “M” and “Hills” variants, most of which only differ in terrain compared to their original
47 counterpart.
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
56 * _underground:
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)
68 * Mesa (Bryce)
69 * Hills biomes
70 * Plateau
71 * Plateau M
72 * Cold Taiga M
73 * Taiga M
74 * Roofed Forest M
75 * Swampland M
76 * Mesa Plateau F M
77 * Extreme Hills Edge
79 TODO:
80 * Better beaches
81 * Improve Extreme Hills M
82 * Desert M
84 Tricky biomes:
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 = {
94 "IcePlains",
95 "IcePlainsSpikes",
96 "ColdTaiga",
97 "ExtremeHills",
98 "ExtremeHillsM",
99 "ExtremeHills+",
100 "Taiga",
101 "MegaTaiga",
102 "MegaSpruceTaiga",
103 "StoneBeach",
104 "Plains",
105 "SunflowerPlains",
106 "Forest",
107 "FlowerForest",
108 "BirchForest",
109 "BirchForestM",
110 "RoofedForest",
111 "Swampland",
112 "Jungle",
113 "JungleM",
114 "JungleEdge",
115 "JungleEdgeM",
116 "MushroomIsland",
117 "Desert",
118 "Savanna",
119 "SavannaM",
120 "Mesa",
121 "MesaPlateauF",
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",
132 depth_top = 1,
133 node_filler = "mcl_core:dirt",
134 depth_filler = 2,
135 node_river_water = "mcl_core:ice",
136 node_riverbed = "mcl_core:sand",
137 depth_riverbed = 2,
138 y_min = 1,
139 y_max = mcl_vars.mg_overworld_max,
140 humidity_point = 24,
141 heat_point = -5,
143 minetest.register_biome({
144 name = "IcePlainsSpikes_ocean",
145 node_top = "mcl_core:sand",
146 depth_top = 2,
147 node_filler = "mcl_core:dirt",
148 depth_filler = 3,
149 node_water_top = "mcl_core:ice",
150 depth_water_top = 2,
151 node_river_water = "mcl_core:ice",
152 node_riverbed = "mcl_core:sand",
153 depth_riverbed = 2,
154 y_min = OCEAN_MIN,
155 y_max = 0,
156 humidity_point = 24,
157 heat_point = -5,
160 -- Cold Taiga
161 minetest.register_biome({
162 name = "ColdTaiga",
163 node_dust = "mcl_core:snow",
164 node_top = "mcl_core:dirt_with_grass_snow",
165 depth_top = 1,
166 node_filler = "mcl_core:dirt",
167 depth_filler = 2,
168 node_riverbed = "mcl_core:sand",
169 depth_riverbed = 2,
170 y_min = 3,
171 y_max = mcl_vars.mg_overworld_max,
172 humidity_point = 58,
173 heat_point = 8,
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",
181 depth_top = 2,
182 node_water_top = "mcl_core:ice",
183 depth_water_top = 1,
184 node_filler = "mcl_core:sandstone",
185 depth_filler = 2,
186 node_riverbed = "mcl_core:sand",
187 depth_riverbed = 2,
188 y_min = 1,
189 y_max = 2,
190 humidity_point = 58,
191 heat_point = 8,
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",
197 depth_top = 2,
198 node_water_top = "mcl_core:ice",
199 depth_water_top = 1,
200 node_filler = "mcl_core:sandstone",
201 depth_filler = 2,
202 node_riverbed = "mcl_core:sand",
203 depth_riverbed = 2,
204 y_min = -3,
205 y_max = 0,
206 humidity_point = 58,
207 heat_point = 8,
209 minetest.register_biome({
210 name = "ColdTaiga_ocean",
211 node_top = "mcl_core:dirt",
212 depth_top = 1,
213 node_filler = "mcl_core:dirt",
214 depth_filler = 3,
215 node_riverbed = "mcl_core:sand",
216 depth_riverbed = 2,
217 y_min = OCEAN_MIN,
218 y_max = -4,
219 humidity_point = 58,
220 heat_point = 8,
223 -- Mega Taiga
224 minetest.register_biome({
225 name = "MegaTaiga",
226 node_top = "mcl_core:podzol",
227 depth_top = 1,
228 node_filler = "mcl_core:dirt",
229 depth_filler = 3,
230 node_riverbed = "mcl_core:sand",
231 depth_riverbed = 2,
232 y_min = 1,
233 y_max = mcl_vars.mg_overworld_max,
234 humidity_point = 76,
235 heat_point = 10,
237 minetest.register_biome({
238 name = "MegaTaiga_ocean",
239 node_top = "mcl_core:dirt",
240 depth_top = 1,
241 node_filler = "mcl_core:dirt",
242 depth_filler = 3,
243 node_riverbed = "mcl_core:sand",
244 depth_riverbed = 2,
245 y_min = OCEAN_MIN,
246 y_max = 0,
247 humidity_point = 76,
248 heat_point = 10,
251 -- Mega Spruce Taiga
252 minetest.register_biome({
253 name = "MegaSpruceTaiga",
254 node_top = "mcl_core:podzol",
255 depth_top = 1,
256 node_filler = "mcl_core:dirt",
257 depth_filler = 3,
258 node_riverbed = "mcl_core:sand",
259 depth_riverbed = 2,
260 y_min = 1,
261 y_max = mcl_vars.mg_overworld_max,
262 humidity_point = 100,
263 heat_point = 8,
265 minetest.register_biome({
266 name = "MegaSpruceTaiga_ocean",
267 node_top = "mcl_core:dirt",
268 depth_top = 1,
269 node_filler = "mcl_core:dirt",
270 depth_filler = 3,
271 node_riverbed = "mcl_core:sand",
272 depth_riverbed = 2,
273 y_min = OCEAN_MIN,
274 y_max = 0,
275 humidity_point = 100,
276 heat_point = 8,
279 -- Extreme Hills
280 minetest.register_biome({
281 name = "ExtremeHills",
282 node_top = "mcl_core:dirt_with_grass",
283 depth_top = 1,
284 node_filler = "mcl_core:dirt",
285 depth_filler = 4,
286 node_riverbed = "mcl_core:sand",
287 depth_riverbed = 4,
288 y_min = 4,
289 y_max = mcl_vars.mg_overworld_max,
290 humidity_point = 10,
291 heat_point = 45,
293 minetest.register_biome({
294 name = "ExtremeHills_beach",
295 node_top = "mcl_core:sand",
296 depth_top = 2,
297 depth_water_top = 1,
298 node_filler = "mcl_core:sandstone",
299 depth_filler = 3,
300 node_riverbed = "mcl_core:sand",
301 depth_riverbed = 4,
302 y_min = -3,
303 y_max = 3,
304 humidity_point = 10,
305 heat_point = 45,
307 minetest.register_biome({
308 name = "ExtremeHills_ocean",
309 node_top = "mcl_core:dirt",
310 depth_top = 1,
311 node_filler = "mcl_core:dirt",
312 depth_filler = 4,
313 node_riverbed = "mcl_core:sand",
314 depth_riverbed = 4,
315 y_min = OCEAN_MIN,
316 y_max = -4,
317 humidity_point = 10,
318 heat_point = 45,
321 -- Extreme Hills M
322 minetest.register_biome({
323 name = "ExtremeHillsM",
324 node_top = "mcl_core:gravel",
325 depth_top = 1,
326 node_filler = "mcl_core:gravel",
327 depth_filler = 3,
328 node_riverbed = "mcl_core:gravel",
329 depth_riverbed = 3,
330 y_min = 1,
331 y_max = mcl_vars.mg_overworld_max,
332 humidity_point = 0,
333 heat_point = 25,
335 minetest.register_biome({
336 name = "ExtremeHillsM_ocean",
337 node_top = "mcl_core:dirt",
338 depth_top = 1,
339 node_filler = "mcl_core:dirt",
340 depth_filler = 3,
341 node_riverbed = "mcl_core:sand",
342 depth_riverbed = 3,
343 y_min = OCEAN_MIN,
344 y_max = 0,
345 humidity_point = 0,
346 heat_point = 25,
349 -- Extreme Hills+
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",
355 depth_top = 1,
356 node_filler = "mcl_core:dirt",
357 depth_filler = 4,
358 node_riverbed = "mcl_core:sand",
359 depth_riverbed = 4,
360 y_min = 1,
361 y_max = 44,
362 humidity_point = 24,
363 heat_point = 25,
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",
370 depth_top = 1,
371 node_filler = "mcl_core:dirt",
372 depth_filler = 4,
373 node_riverbed = "mcl_core:sand",
374 depth_riverbed = 4,
375 y_min = 45,
376 y_max = mcl_vars.mg_overworld_max,
377 humidity_point = 24,
378 heat_point = 25,
380 minetest.register_biome({
381 name = "ExtremeHills+_ocean",
382 node_top = "mcl_core:dirt",
383 depth_top = 1,
384 node_filler = "mcl_core:dirt",
385 depth_filler = 4,
386 node_riverbed = "mcl_core:sand",
387 depth_riverbed = 4,
388 y_min = OCEAN_MIN,
389 y_max = 0,
390 humidity_point = 24,
391 heat_point = 25,
394 -- Stone beach
395 -- TODO: Should occour only at real beaches.
396 minetest.register_biome({
397 name = "StoneBeach",
398 node_riverbed = "mcl_core:sand",
399 depth_riverbed = 1,
400 y_min = -6,
401 y_max = mcl_vars.mg_overworld_max,
402 humidity_point = 0,
403 heat_point = 8,
406 minetest.register_biome({
407 name = "StoneBeach_ocean",
408 node_top = "mcl_core:dirt",
409 depth_top = 1,
410 node_riverbed = "mcl_core:sand",
411 depth_riverbed = 1,
412 y_min = OCEAN_MIN,
413 y_max = -7,
414 humidity_point = 0,
415 heat_point = 8,
418 -- Ice Plains
419 minetest.register_biome({
420 name = "IcePlains",
421 node_dust = "mcl_core:snow",
422 node_top = "mcl_core:dirt_with_grass_snow",
423 depth_top = 1,
424 node_filler = "mcl_core:dirt",
425 depth_filler = 2,
426 node_water_top = "mcl_core:ice",
427 depth_water_top = 2,
428 node_river_water = "mcl_core:ice",
429 node_riverbed = "mcl_core:sand",
430 depth_riverbed = 2,
431 y_min = 1,
432 y_max = mcl_vars.mg_overworld_max,
433 humidity_point = 24,
434 heat_point = 8,
436 minetest.register_biome({
437 name = "IcePlains_ocean",
438 node_top = "mcl_core:dirt",
439 depth_top = 1,
440 node_filler = "mcl_core:dirt",
441 depth_filler = 3,
442 node_riverbed = "mcl_core:sand",
443 depth_riverbed = 2,
444 y_min = OCEAN_MIN,
445 y_max = 0,
446 humidity_point = 24,
447 heat_point = 8,
450 -- Plains
451 minetest.register_biome({
452 name = "Plains",
453 node_top = "mcl_core:dirt_with_grass",
454 depth_top = 1,
455 node_filler = "mcl_core:dirt",
456 depth_filler = 2,
457 node_riverbed = "mcl_core:sand",
458 depth_riverbed = 2,
459 y_min = 3,
460 y_max = mcl_vars.mg_overworld_max,
461 humidity_point = 39,
462 heat_point = 58,
464 minetest.register_biome({
465 name = "Plains_beach",
466 node_top = "mcl_core:sand",
467 depth_top = 2,
468 node_filler = "mcl_core:sandstone",
469 depth_filler = 2,
470 node_riverbed = "mcl_core:sand",
471 depth_riverbed = 2,
472 y_min = 0,
473 y_max = 2,
474 humidity_point = 39,
475 heat_point = 58,
477 minetest.register_biome({
478 name = "Plains_ocean",
479 node_top = "mcl_core:dirt",
480 depth_top = 1,
481 node_filler = "mcl_core:dirt",
482 depth_filler = 3,
483 node_riverbed = "mcl_core:sand",
484 depth_riverbed = 2,
485 y_min = OCEAN_MIN,
486 y_max = -1,
487 humidity_point = 39,
488 heat_point = 58,
491 -- Sunflower Plains
492 minetest.register_biome({
493 name = "SunflowerPlains",
494 node_top = "mcl_core:dirt_with_grass",
495 depth_top = 1,
496 node_filler = "mcl_core:dirt",
497 depth_filler = 3,
498 node_riverbed = "mcl_core:sand",
499 depth_riverbed = 2,
500 y_min = 4,
501 y_max = mcl_vars.mg_overworld_max,
502 humidity_point = 28,
503 heat_point = 45,
505 minetest.register_biome({
506 name = "SunflowerPlains_ocean",
507 node_top = "mcl_core:dirt",
508 depth_top = 1,
509 node_filler = "mcl_core:dirt",
510 depth_filler = 3,
511 node_riverbed = "mcl_core:dirt",
512 depth_riverbed = 2,
513 y_min = OCEAN_MIN,
514 y_max = 0,
515 humidity_point = 28,
516 heat_point = 45,
519 -- Taiga
520 minetest.register_biome({
521 name = "Taiga",
522 node_top = "mcl_core:dirt_with_grass",
523 depth_top = 1,
524 node_filler = "mcl_core:dirt",
525 depth_filler = 3,
526 node_riverbed = "mcl_core:sand",
527 depth_riverbed = 2,
528 y_min = 4,
529 y_max = mcl_vars.mg_overworld_max,
530 humidity_point = 58,
531 heat_point = 22,
533 minetest.register_biome({
534 name = "Taiga_beach",
535 node_top = "mcl_core:sand",
536 depth_top = 2,
537 node_filler = "mcl_core:sandstone",
538 depth_filler = 1,
539 node_riverbed = "mcl_core:sand",
540 depth_riverbed = 2,
541 y_min = 1,
542 y_max = 3,
543 humidity_point = 58,
544 heat_point = 22,
546 minetest.register_biome({
547 name = "Taiga_ocean",
548 node_top = "mcl_core:sand",
549 depth_top = 1,
550 node_filler = "mcl_core:dirt",
551 depth_filler = 3,
552 node_riverbed = "mcl_core:sand",
553 depth_riverbed = 2,
554 y_min = OCEAN_MIN,
555 y_max = 0,
556 humidity_point = 58,
557 heat_point = 22,
560 -- Forest
561 minetest.register_biome({
562 name = "Forest",
563 node_top = "mcl_core:dirt_with_grass",
564 depth_top = 1,
565 node_filler = "mcl_core:dirt",
566 depth_filler = 3,
567 node_riverbed = "mcl_core:sand",
568 depth_riverbed = 2,
569 y_min = 1,
570 y_max = mcl_vars.mg_overworld_max,
571 humidity_point = 61,
572 heat_point = 45,
574 minetest.register_biome({
575 name = "Forest_beach",
576 node_top = "mcl_core:sand",
577 depth_top = 2,
578 node_filler = "mcl_core:sandstone",
579 depth_filler = 1,
580 node_riverbed = "mcl_core:sand",
581 depth_riverbed = 2,
582 y_min = -1,
583 y_max = 0,
584 humidity_point = 61,
585 heat_point = 45,
587 minetest.register_biome({
588 name = "Forest_ocean",
589 node_top = "mcl_core:dirt",
590 depth_top = 1,
591 node_filler = "mcl_core:dirt",
592 depth_filler = 3,
593 node_riverbed = "mcl_core:sand",
594 depth_riverbed = 2,
595 y_min = OCEAN_MIN,
596 y_max = -2,
597 humidity_point = 61,
598 heat_point = 45,
601 -- Flower Forest
602 minetest.register_biome({
603 name = "FlowerForest",
604 node_top = "mcl_core:dirt_with_grass",
605 depth_top = 1,
606 node_filler = "mcl_core:dirt",
607 depth_filler = 3,
608 node_riverbed = "mcl_core:sand",
609 depth_riverbed = 2,
610 y_min = 3,
611 y_max = mcl_vars.mg_overworld_max,
612 humidity_point = 44,
613 heat_point = 32,
615 minetest.register_biome({
616 name = "FlowerForest_beach",
617 node_top = "mcl_core:sand",
618 depth_top = 2,
619 node_filler = "mcl_core:sandstone",
620 depth_filler = 1,
621 node_riverbed = "mcl_core:sand",
622 depth_riverbed = 2,
623 y_min = -2,
624 y_max = 2,
625 humidity_point = 44,
626 heat_point = 32,
628 minetest.register_biome({
629 name = "FlowerForest_ocean",
630 node_top = "mcl_core:dirt",
631 depth_top = 1,
632 node_filler = "mcl_core:dirt",
633 depth_filler = 3,
634 node_riverbed = "mcl_core:sand",
635 depth_riverbed = 2,
636 y_min = OCEAN_MIN,
637 y_max = -3,
638 humidity_point = 44,
639 heat_point = 32,
642 -- Birch Forest
643 minetest.register_biome({
644 name = "BirchForest",
645 node_top = "mcl_core:dirt_with_grass",
646 depth_top = 1,
647 node_filler = "mcl_core:dirt",
648 depth_filler = 3,
649 node_riverbed = "mcl_core:sand",
650 depth_riverbed = 2,
651 y_min = 1,
652 y_max = mcl_vars.mg_overworld_max,
653 humidity_point = 78,
654 heat_point = 31,
656 minetest.register_biome({
657 name = "BirchForest_ocean",
658 node_top = "mcl_core:dirt",
659 depth_top = 1,
660 node_filler = "mcl_core:dirt",
661 depth_filler = 3,
662 node_riverbed = "mcl_core:sand",
663 depth_riverbed = 2,
664 y_min = OCEAN_MIN,
665 y_max = 0,
666 humidity_point = 78,
667 heat_point = 31,
670 -- Birch Forest M
671 minetest.register_biome({
672 name = "BirchForestM",
673 node_top = "mcl_core:dirt_with_grass",
674 depth_top = 1,
675 node_filler = "mcl_core:dirt",
676 depth_filler = 3,
677 node_riverbed = "mcl_core:sand",
678 depth_riverbed = 2,
679 y_min = 1,
680 y_max = mcl_vars.mg_overworld_max,
681 humidity_point = 77,
682 heat_point = 27,
684 minetest.register_biome({
685 name = "BirchForestM_ocean",
686 node_top = "mcl_core:dirt",
687 depth_top = 1,
688 node_filler = "mcl_core:dirt",
689 depth_filler = 3,
690 node_riverbed = "mcl_core:sand",
691 depth_riverbed = 2,
692 y_min = OCEAN_MIN,
693 y_max = 0,
694 humidity_point = 77,
695 heat_point = 27,
698 -- Desert
699 minetest.register_biome({
700 name = "Desert",
701 node_top = "mcl_core:sand",
702 depth_top = 1,
703 node_filler = "mcl_core:sand",
704 depth_filler = 2,
705 node_riverbed = "mcl_core:sand",
706 depth_riverbed = 2,
707 node_stone = "mcl_core:sandstone",
708 y_min = 1,
709 y_max = mcl_vars.mg_overworld_max,
710 humidity_point = 26,
711 heat_point = 94,
713 minetest.register_biome({
714 name = "Desert_ocean",
715 node_top = "mcl_core:sand",
716 depth_top = 1,
717 node_filler = "mcl_core:sand",
718 depth_filler = 3,
719 node_riverbed = "mcl_core:sand",
720 depth_riverbed = 2,
721 y_min = OCEAN_MIN,
722 y_max = 0,
723 humidity_point = 26,
724 heat_point = 94,
727 -- Roofed Forest
728 minetest.register_biome({
729 name = "RoofedForest",
730 node_top = "mcl_core:dirt_with_grass",
731 depth_top = 1,
732 node_filler = "mcl_core:dirt",
733 depth_filler = 2,
734 node_riverbed = "mcl_core:sand",
735 depth_riverbed = 2,
736 y_min = 1,
737 y_max = mcl_vars.mg_overworld_max,
738 humidity_point = 94,
739 heat_point = 27,
741 minetest.register_biome({
742 name = "RoofedForest_ocean",
743 node_top = "mcl_core:dirt",
744 depth_top = 1,
745 node_filler = "mcl_core:dirt",
746 depth_filler = 2,
747 node_riverbed = "mcl_core:sand",
748 depth_riverbed = 2,
749 y_min = OCEAN_MIN,
750 y_max = 0,
751 humidity_point = 94,
752 heat_point = 27,
755 -- Mesa
756 minetest.register_biome({
757 name = "Mesa",
758 node_top = "mcl_colorblocks:hardened_clay",
759 depth_top = 1,
760 node_filler = "mcl_colorblocks:hardened_clay",
761 node_stone = "mcl_colorblocks:hardened_clay",
762 y_min = 11,
763 y_max = mcl_vars.mg_overworld_max,
764 humidity_point = 0,
765 heat_point = 100,
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",
771 depth_top = 1,
772 node_filler = "mcl_colorblocks:hardened_clay_orange",
773 depth_filler = 3,
774 node_riverbed = "mcl_core:redsand",
775 depth_riverbed = 1,
776 node_stone = "mcl_colorblocks:hardened_clay_orange",
777 y_min = -3,
778 y_max = 10,
779 humidity_point = 0,
780 heat_point = 100,
782 minetest.register_biome({
783 name = "Mesa_ocean",
784 node_top = "mcl_core:sand",
785 depth_top = 3,
786 node_filler = "mcl_core:sand",
787 depth_filler = 2,
788 node_riverbed = "mcl_core:sand",
789 depth_riverbed = 2,
790 y_min = OCEAN_MIN,
791 y_max = -4,
792 humidity_point = 0,
793 heat_point = 100,
796 -- Mesa Plateau F
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",
801 depth_top = 1,
802 node_filler = "mcl_colorblocks:hardened_clay",
803 node_stone = "mcl_colorblocks:hardened_clay",
804 y_min = 11,
805 y_max = 29,
806 humidity_point = 0,
807 heat_point = 60,
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",
815 depth_top = 1,
816 node_filler = "mcl_core:dirt",
817 filler_depth = 1,
818 node_stone = "mcl_colorblocks:hardened_clay",
819 y_min = 30,
820 y_max = mcl_vars.mg_overworld_max,
821 humidity_point = 0,
822 heat_point = 60,
825 -- Helper biome for the red sand at the bottom.
826 minetest.register_biome({
827 name = "MesaPlateauF_sandlevel",
828 node_top = "mcl_core:redsand",
829 depth_top = 1,
830 node_filler = "mcl_colorblocks:hardened_clay_orange",
831 depth_filler = 3,
832 node_riverbed = "mcl_core:redsand",
833 depth_riverbed = 1,
834 node_stone = "mcl_colorblocks:hardened_clay_orange",
835 y_min = -3,
836 y_max = 10,
837 humidity_point = 0,
838 heat_point = 60,
840 minetest.register_biome({
841 name = "MesaPlateauF_ocean",
842 node_top = "mcl_core:sand",
843 depth_top = 3,
844 node_filler = "mcl_colorblocks:sand",
845 depth_filler = 2,
846 node_riverbed = "mcl_core:sand",
847 depth_riverbed = 2,
848 y_min = OCEAN_MIN,
849 y_max = -4,
850 humidity_point = 0,
851 heat_point = 60,
854 -- Savanna
855 minetest.register_biome({
856 name = "Savanna",
857 node_top = "mcl_core:dirt_with_dry_grass",
858 depth_top = 1,
859 node_filler = "mcl_core:dirt",
860 depth_filler = 2,
861 node_riverbed = "mcl_core:sand",
862 depth_riverbed = 2,
863 y_min = 1,
864 y_max = mcl_vars.mg_overworld_max,
865 humidity_point = 36,
866 heat_point = 79,
868 minetest.register_biome({
869 name = "Savanna_beach",
870 node_top = "mcl_core:sand",
871 depth_top = 3,
872 node_filler = "mcl_core:sandstone",
873 depth_filler = 2,
874 node_riverbed = "mcl_core:sand",
875 depth_riverbed = 2,
876 y_min = -1,
877 y_max = 0,
878 humidity_point = 36,
879 heat_point = 79,
881 minetest.register_biome({
882 name = "Savanna_ocean",
883 node_top = "mcl_core:dirt",
884 depth_top = 1,
885 node_filler = "mcl_core:dirt",
886 depth_filler = 3,
887 node_riverbed = "mcl_core:sand",
888 depth_riverbed = 2,
889 y_min = OCEAN_MIN,
890 y_max = -2,
891 humidity_point = 36,
892 heat_point = 79,
895 -- Savanna M
896 -- Changes to Savanna: Coarse Dirt. No sand beach. No oaks.
897 -- Otherwise identical to Savanna
898 minetest.register_biome({
899 name = "SavannaM",
900 node_top = "mcl_core:dirt_with_dry_grass",
901 depth_top = 1,
902 node_filler = "mcl_core:coarse_dirt",
903 depth_filler = 3,
904 node_riverbed = "mcl_core:sand",
905 depth_riverbed = 2,
906 y_min = 1,
907 y_max = mcl_vars.mg_overworld_max,
908 humidity_point = 48,
909 heat_point = 100,
911 minetest.register_biome({
912 name = "SavannaM_ocean",
913 node_top = "mcl_core:dirt",
914 depth_top = 1,
915 node_filler = "mcl_core:dirt",
916 depth_filler = 3,
917 node_riverbed = "mcl_core:sand",
918 depth_riverbed = 2,
919 y_min = OCEAN_MIN,
920 y_max = 0,
921 humidity_point = 48,
922 heat_point = 100,
925 -- Jungle
926 minetest.register_biome({
927 name = "Jungle",
928 node_top = "mcl_core:dirt_with_grass",
929 depth_top = 1,
930 node_filler = "mcl_core:dirt",
931 depth_filler = 3,
932 node_riverbed = "mcl_core:sand",
933 depth_riverbed = 2,
934 y_min = 1,
935 y_max = mcl_vars.mg_overworld_max,
936 humidity_point = 88,
937 heat_point = 81,
939 minetest.register_biome({
940 name = "Jungle_shore",
941 node_top = "mcl_core:dirt",
942 depth_top = 1,
943 node_filler = "mcl_core:dirt",
944 depth_filler = 3,
945 node_riverbed = "mcl_core:sand",
946 depth_riverbed = 2,
947 y_min = -1,
948 y_max = 0,
949 humidity_point = 88,
950 heat_point = 81,
952 minetest.register_biome({
953 name = "Jungle_ocean",
954 node_top = "mcl_core:dirt",
955 depth_top = 1,
956 node_filler = "mcl_core:dirt",
957 depth_filler = 3,
958 node_riverbed = "mcl_core:sand",
959 depth_riverbed = 2,
960 y_min = OCEAN_MIN,
961 y_max = -2,
962 humidity_point = 88,
963 heat_point = 81,
966 -- Jungle M
967 -- Like Jungle but with even more dense vegetation
968 minetest.register_biome({
969 name = "JungleM",
970 node_top = "mcl_core:dirt_with_grass",
971 depth_top = 1,
972 node_filler = "mcl_core:dirt",
973 depth_filler = 3,
974 node_riverbed = "mcl_core:sand",
975 depth_riverbed = 2,
976 y_min = 1,
977 y_max = mcl_vars.mg_overworld_max,
978 humidity_point = 92,
979 heat_point = 81,
981 minetest.register_biome({
982 name = "JungleM_shore",
983 node_top = "mcl_core:dirt",
984 depth_top = 1,
985 node_filler = "mcl_core:dirt",
986 depth_filler = 3,
987 node_riverbed = "mcl_core:sand",
988 depth_riverbed = 2,
989 y_min = -1,
990 y_max = 0,
991 humidity_point = 92,
992 heat_point = 81,
994 minetest.register_biome({
995 name = "JungleM_ocean",
996 node_top = "mcl_core:dirt",
997 depth_top = 1,
998 node_filler = "mcl_core:dirt",
999 depth_filler = 3,
1000 node_riverbed = "mcl_core:sand",
1001 depth_riverbed = 2,
1002 y_min = OCEAN_MIN,
1003 y_max = -2,
1004 humidity_point = 92,
1005 heat_point = 81,
1008 -- Jungle Edge
1009 minetest.register_biome({
1010 name = "JungleEdge",
1011 node_top = "mcl_core:dirt_with_grass",
1012 depth_top = 1,
1013 node_filler = "mcl_core:dirt",
1014 depth_filler = 2,
1015 node_riverbed = "mcl_core:sand",
1016 depth_riverbed = 2,
1017 y_min = 1,
1018 y_max = mcl_vars.mg_overworld_max,
1019 humidity_point = 88,
1020 heat_point = 76,
1022 minetest.register_biome({
1023 name = "JungleEdge_ocean",
1024 node_top = "mcl_core:dirt",
1025 depth_top = 1,
1026 node_filler = "mcl_core:dirt",
1027 depth_filler = 2,
1028 node_riverbed = "mcl_core:sand",
1029 depth_riverbed = 2,
1030 y_min = OCEAN_MIN,
1031 y_max = 0,
1032 humidity_point = 88,
1033 heat_point = 76,
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",
1043 depth_top = 1,
1044 node_filler = "mcl_core:dirt",
1045 depth_filler = 4,
1046 node_riverbed = "mcl_core:sand",
1047 depth_riverbed = 2,
1048 y_min = 1,
1049 y_max = mcl_vars.mg_overworld_max,
1050 humidity_point = 90,
1051 heat_point = 79,
1053 minetest.register_biome({
1054 name = "JungleEdgeM_ocean",
1055 node_top = "mcl_core:dirt",
1056 depth_top = 1,
1057 node_filler = "mcl_core:dirt",
1058 depth_filler = 4,
1059 node_riverbed = "mcl_core:sand",
1060 depth_riverbed = 2,
1061 y_min = OCEAN_MIN,
1062 y_max = 0,
1063 humidity_point = 90,
1064 heat_point = 79,
1067 -- Swampland
1068 minetest.register_biome({
1069 name = "Swampland",
1070 node_top = "mcl_core:dirt_with_grass",
1071 depth_top = 1,
1072 node_filler = "mcl_core:dirt",
1073 depth_filler = 3,
1074 node_riverbed = "mcl_core:sand",
1075 depth_riverbed = 2,
1076 y_min = 1,
1077 -- Note: Limited in height!
1078 y_max = 23,
1079 humidity_point = 90,
1080 heat_point = 50,
1082 minetest.register_biome({
1083 name = "Swampland_shore",
1084 node_top = "mcl_core:dirt",
1085 depth_top = 1,
1086 node_filler = "mcl_core:dirt",
1087 depth_filler = 3,
1088 node_riverbed = "mcl_core:sand",
1089 depth_riverbed = 2,
1090 y_min = -4,
1091 y_max = 0,
1092 humidity_point = 90,
1093 heat_point = 50,
1095 minetest.register_biome({
1096 name = "Swampland_ocean",
1097 node_top = "mcl_core:sand",
1098 depth_top = 1,
1099 node_filler = "mcl_core:sand",
1100 depth_filler = 3,
1101 node_riverbed = "mcl_core:sand",
1102 depth_riverbed = 2,
1103 y_min = OCEAN_MIN,
1104 y_max = -5,
1105 humidity_point = 90,
1106 heat_point = 50,
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",
1114 depth_top = 1,
1115 node_filler = "mcl_core:dirt",
1116 depth_filler = 3,
1117 node_riverbed = "mcl_core:sand",
1118 depth_riverbed = 2,
1119 y_min = 4,
1120 -- Note: Limited in height!
1121 y_max = 20,
1122 humidity_point = 106,
1123 heat_point = 50,
1126 minetest.register_biome({
1127 name = "MushroomIslandShore",
1128 node_top = "mcl_core:mycelium",
1129 depth_top = 1,
1130 node_filler = "mcl_core:dirt",
1131 depth_filler = 3,
1132 node_riverbed = "mcl_core:sand",
1133 depth_riverbed = 2,
1134 y_min = 1,
1135 y_max = 3,
1136 humidity_point = 106,
1137 heat_point = 50,
1139 minetest.register_biome({
1140 name = "MushroomIsland_ocean",
1141 node_top = "mcl_core:dirt",
1142 depth_top = 1,
1143 node_filler = "mcl_core:dirt",
1144 depth_filler = 3,
1145 node_riverbed = "mcl_core:sand",
1146 depth_riverbed = 2,
1147 y_min = OCEAN_MIN,
1148 y_max = 0,
1149 humidity_point = 106,
1150 heat_point = 50,
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",
1165 depth_top = 1,
1166 node_filler = "mcl_core:gravel",
1167 depth_filler = 2,
1168 node_riverbed = "mcl_core:gravel",
1169 depth_riverbed = 2,
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()
1187 --[[ REALMS ]]
1189 --[[ THE NETHER ]]
1190 minetest.register_biome({
1191 name = "Nether",
1192 node_filler = "mcl_nether:netherrack",
1193 node_stone = "mcl_nether:netherrack",
1194 node_water = "air",
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.
1198 -- Figure out why.
1199 y_max = mcl_vars.mg_nether_max + 80,
1200 heat_point = 100,
1201 humidity_point = 0,
1204 --[[ THE END ]]
1205 minetest.register_biome({
1206 name = "End",
1207 node_stone = "air",
1208 node_filler = "air",
1209 node_water = "air",
1210 node_river_water = "air",
1211 -- FIXME: For some reason the End stops generating early if this constant is not added.
1212 -- Figure out why.
1213 y_min = mcl_vars.mg_end_min,
1214 y_max = mcl_vars.mg_end_max + 80,
1215 heat_point = 50,
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({
1226 ore_type = "sheet",
1227 ore = "mcl_core:coarse_dirt",
1228 wherein = {"mcl_core:podzol", "mcl_core:dirt"},
1229 clust_scarcity = 1,
1230 clust_num_ores = 12,
1231 clust_size = 10,
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({
1240 ore_type = "sheet",
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({
1252 ore_type = "blob",
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,
1257 clust_size = 7,
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({
1265 ore_type = "blob",
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,
1271 clust_size = 4,
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({
1282 ore_type = "sheet",
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},
1286 biomes = {
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,
1293 y_min = -32,
1294 y_max = 0,
1299 -- Mesa strata (registered as sheet ores)
1301 -- Helper function to create strata.
1302 local stratum = function(y_min, height, color, seed)
1303 if not height then
1304 height = 1
1306 if not seed then
1307 seed = 39
1309 local y_max = y_min + height-1
1310 minetest.register_ore({
1311 ore_type = "sheet",
1312 ore = "mcl_colorblocks:hardened_clay_"..color,
1313 wherein = {"mcl_colorblocks:hardened_clay"},
1314 column_height_min = height,
1315 column_height_max = height,
1316 y_min = y_min,
1317 y_max = y_max,
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"))
1332 --[[
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" }
1344 -- Start level
1345 local y = 17
1347 -- Generate stratas
1348 repeat
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)
1354 local h
1355 if heightrandom == 12 then
1356 h = 4
1357 elseif heightrandom >= 10 then
1358 h = 3
1359 elseif heightrandom >= 8 then
1360 h = 2
1361 else
1362 h = 1
1364 -- Small built-in bias: Only thin strata up to this Y level
1365 if y < 45 then
1366 h = math.min(h, 2)
1369 -- Register stratum
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)
1374 local skip
1375 if skiprandom == 12 then
1376 skip = 4
1377 elseif skiprandom >= 10 then
1378 skip = 3
1379 elseif skiprandom >= 5 then
1380 skip = 2
1381 elseif skiprandom >= 2 then
1382 skip = 1
1383 else
1384 -- If this happens, the next stratum will touch the previous one without gap
1385 skip = 0
1388 -- Get height of next stratum or finish
1389 y = y + h + skip
1390 until y > 256
1392 --[[ END OF DANGER ZONE ]]
1395 -- Non-Overworld ores
1396 local function register_dimension_ores()
1398 --[[ NETHER GENERATION ]]
1400 -- Soul sand
1401 minetest.register_ore({
1402 ore_type = "sheet",
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,
1408 clust_size = 5,
1409 y_min = mcl_vars.mg_nether_min,
1410 y_max = mcl_util.layer_to_y(64, "nether"),
1411 noise_threshold = 0.0,
1412 noise_params = {
1413 offset = 0.5,
1414 scale = 0.1,
1415 spread = {x = 5, y = 5, z = 5},
1416 seed = 2316,
1417 octaves = 1,
1418 persist = 0.0
1422 -- Magma blocks
1423 minetest.register_ore({
1424 ore_type = "blob",
1425 ore = "mcl_nether:magma",
1426 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1427 clust_scarcity = 8*8*8,
1428 clust_num_ores = 45,
1429 clust_size = 6,
1430 y_min = mcl_util.layer_to_y(23, "nether"),
1431 y_max = mcl_util.layer_to_y(37, "nether"),
1433 minetest.register_ore({
1434 ore_type = "blob",
1435 ore = "mcl_nether:magma",
1436 wherein = {"mcl_nether:netherrack"},
1437 clust_scarcity = 10*10*10,
1438 clust_num_ores = 65,
1439 clust_size = 8,
1440 y_min = mcl_util.layer_to_y(23, "nether"),
1441 y_max = mcl_util.layer_to_y(37, "nether"),
1444 -- Glowstone
1445 minetest.register_ore({
1446 ore_type = "blob",
1447 ore = "mcl_nether:glowstone",
1448 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1449 clust_scarcity = 26 * 26 * 26,
1450 clust_size = 5,
1451 y_min = mcl_vars.mg_lava_nether_max + 10,
1452 y_max = mcl_vars.mg_nether_max,
1453 noise_threshold = 0.0,
1454 noise_params = {
1455 offset = 0.5,
1456 scale = 0.1,
1457 spread = {x = 5, y = 5, z = 5},
1458 seed = 17676,
1459 octaves = 1,
1460 persist = 0.0
1464 -- Gravel (Nether)
1465 minetest.register_ore({
1466 ore_type = "sheet",
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,
1476 noise_params = {
1477 offset = 0.0,
1478 scale = 0.5,
1479 spread = {x = 20, y = 20, z = 20},
1480 seed = 766,
1481 octaves = 3,
1482 persist = 0.6,
1486 -- Nether quartz
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
1493 clust_size = 3,
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
1503 clust_size = 4,
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,
1514 clust_num_ores = 1,
1515 clust_size = 1,
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,
1525 clust_num_ores = 1,
1526 clust_size = 1,
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,
1536 clust_num_ores = 1,
1537 clust_size = 1,
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,
1546 clust_num_ores = 1,
1547 clust_size = 1,
1548 y_min = mcl_vars.mg_lava_nether_max + 49,
1549 y_max = mcl_vars.mg_nether_max,
1552 --[[ THE END ]]
1554 -- Generate fake End
1555 -- TODO: Remove both "ores" when there's a better End generator
1557 minetest.register_ore({
1558 ore_type = "sheet",
1559 ore = "mcl_end:end_stone",
1560 wherein = {"air"},
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,
1566 noise_params = {
1567 offset = -2,
1568 scale = 8,
1569 spread = {x=100, y=100, z=100},
1570 seed = 2999,
1571 octaves = 5,
1572 persist = 0.55,
1574 noise_threshold = 0,
1577 minetest.register_ore({
1578 ore_type = "sheet",
1579 ore = "mcl_end:end_stone",
1580 wherein = {"air"},
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,
1586 noise_params = {
1587 offset = -4,
1588 scale = 3,
1589 spread = {x=200, y=200, z=200},
1590 seed = 5390,
1591 octaves = 5,
1592 persist = 0.6,
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"}
1608 seed = 333
1609 elseif grasstype == "tallgrass" then
1610 node = "mcl_flowers:tallgrass"
1611 place_on = {"group:grass_block_no_snow"}
1612 seed = 420
1614 local noise = {
1615 offset = offset,
1616 scale = scale,
1617 spread = {x = 200, y = 200, z = 200},
1618 seed = seed,
1619 octaves = 3,
1620 persist = 0.6
1622 minetest.register_decoration({
1623 deco_type = "simple",
1624 place_on = place_on,
1625 sidelen = 16,
1626 noise_params = noise,
1627 biomes = biomes,
1628 y_min = 1,
1629 y_max = mcl_vars.mg_overworld_max,
1630 decoration = node,
1631 param2 = param2,
1635 local function register_decorations()
1636 -- Large ice spike
1637 minetest.register_decoration({
1638 deco_type = "schematic",
1639 place_on = {"mcl_core:snowblock", "mcl_core:snow", "group:grass_block_snow"},
1640 sidelen = 80,
1641 noise_params = {
1642 offset = 0.00040,
1643 scale = 0.001,
1644 spread = {x = 250, y = 250, z = 250},
1645 seed = 1133,
1646 octaves = 4,
1647 persist = 0.67,
1649 biomes = {"IcePlainsSpikes"},
1650 y_min = 4,
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",
1657 -- Small ice spike
1658 minetest.register_decoration({
1659 deco_type = "schematic",
1660 place_on = {"mcl_core:snowblock", "mcl_core:snow", "group:grass_block_snow"},
1661 sidelen = 80,
1662 noise_params = {
1663 offset = 0.005,
1664 scale = 0.001,
1665 spread = {x = 250, y = 250, z = 250},
1666 seed = 1133,
1667 octaves = 4,
1668 persist = 0.67,
1670 biomes = {"IcePlainsSpikes"},
1671 y_min = 4,
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",
1678 -- Oak
1679 -- Large oaks
1680 for i=1, 2 do
1681 minetest.register_decoration({
1682 deco_type = "schematic",
1683 place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
1684 sidelen = 80,
1685 noise_params = {
1686 offset = 0.00075,
1687 scale = 0.0011,
1688 spread = {x = 250, y = 250, z = 250},
1689 seed = 3,
1690 octaves = 3,
1691 persist = 0.66
1693 biomes = {"Forest"},
1694 y_min = 1,
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", },
1704 sidelen = 80,
1705 noise_params = {
1706 offset = -0.0004,
1707 scale = 0.001,
1708 spread = {x = 250, y = 250, z = 250},
1709 seed = 3,
1710 octaves = 3,
1711 persist = 0.6
1713 biomes = {"ExtremeHills", "ExtremeHillsM", "ExtremeHills+", "ExtremeHills+_snowtop"},
1714 y_min = 1,
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"},
1725 sidelen = 16,
1726 noise_params = {
1727 offset = 0.025,
1728 scale = 0.0022,
1729 spread = {x = 250, y = 250, z = 250},
1730 seed = 2,
1731 octaves = 3,
1732 persist = 0.66
1734 biomes = {"Forest"},
1735 y_min = 1,
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"},
1744 sidelen = 16,
1745 noise_params = {
1746 offset = 0.01,
1747 scale = 0.0022,
1748 spread = {x = 250, y = 250, z = 250},
1749 seed = 2,
1750 octaves = 3,
1751 persist = 0.66
1753 biomes = {"FlowerForest"},
1754 y_min = 1,
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", },
1763 sidelen = 16,
1764 noise_params = {
1765 offset = 0.0,
1766 scale = 0.002,
1767 spread = {x = 250, y = 250, z = 250},
1768 seed = 2,
1769 octaves = 3,
1770 persist = 0.7
1772 biomes = {"ExtremeHills", "ExtremeHillsM", "ExtremeHills+", "ExtremeHills+_snowtop"},
1773 y_min = 1,
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"},
1783 sidelen = 16,
1784 noise_params = {
1785 offset = 0.006,
1786 scale = 0.002,
1787 spread = {x = 250, y = 250, z = 250},
1788 seed = 2,
1789 octaves = 3,
1790 persist = 0.7
1792 biomes = {"ExtremeHills+", "ExtremeHills+_snowtop"},
1793 y_min = 50,
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"},
1802 sidelen = 16,
1803 noise_params = {
1804 offset = 0.015,
1805 scale = 0.002,
1806 spread = {x = 250, y = 250, z = 250},
1807 seed = 2,
1808 octaves = 3,
1809 persist = 0.7
1811 biomes = {"MesaPlateauF_grasstop"},
1812 y_min = 30,
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", },
1822 sidelen = 16,
1823 noise_params = {
1824 offset = 0.0,
1825 scale = 0.0002,
1826 spread = {x = 250, y = 250, z = 250},
1827 seed = 2,
1828 octaves = 3,
1829 persist = 0.7
1831 biomes = {"IcePlains"},
1832 y_min = 1,
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"},
1841 sidelen = 80,
1842 fill_ratio = 0.004,
1843 biomes = {"Jungle", "JungleM"},
1844 y_min = 1,
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"},
1853 sidelen = 80,
1854 fill_ratio = 0.0004,
1855 biomes = {"JungleEdge", "JungleEdgeM", "Savanna"},
1856 y_min = 1,
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",
1864 -- Rare balloon oak
1865 minetest.register_decoration({
1866 deco_type = "schematic",
1867 place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
1868 sidelen = 16,
1869 noise_params = {
1870 offset = 0.002083,
1871 scale = 0.0022,
1872 spread = {x = 250, y = 250, z = 250},
1873 seed = 3,
1874 octaves = 3,
1875 persist = 0.6,
1877 biomes = {"Forest"},
1878 y_min = 1,
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",
1884 -- Swamp oak
1885 minetest.register_decoration({
1886 deco_type = "schematic",
1887 place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
1888 sidelen = 80,
1889 noise_params = {
1890 offset = 0.0055,
1891 scale = 0.0011,
1892 spread = {x = 250, y = 250, z = 250},
1893 seed = 5005,
1894 octaves = 5,
1895 persist = 0.6,
1897 biomes = {"Swampland", "Swampland_shore"},
1898 y_min = 0,
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",
1905 -- Jungle tree
1907 -- Huge jungle tree (2 variants)
1908 for i=1, 2 do
1909 minetest.register_decoration({
1910 deco_type = "schematic",
1911 place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
1912 sidelen = 80,
1913 fill_ratio = 0.00125,
1914 biomes = {"Jungle"},
1915 y_min = 4,
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"},
1924 sidelen = 80,
1925 fill_ratio = 0.004,
1926 biomes = {"JungleM"},
1927 y_min = 4,
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"},
1939 sidelen = 80,
1940 fill_ratio = 0.045,
1941 biomes = {"Jungle"},
1942 y_min = 1,
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"},
1951 sidelen = 80,
1952 fill_ratio = 0.0045,
1953 biomes = {"JungleEdge", "JungleEdgeM"},
1954 y_min = 1,
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"},
1964 sidelen = 80,
1965 fill_ratio = 0.09,
1966 biomes = {"JungleM"},
1967 y_min = 1,
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",
1974 -- Spruce
1975 local function quick_spruce(seed, offset, sprucename, biomes, y)
1976 if not y then
1977 y = 1
1979 minetest.register_decoration({
1980 deco_type = "schematic",
1981 place_on = {"group:grass_block", "mcl_core:dirt", "mcl_core:podzol"},
1982 sidelen = 16,
1983 noise_params = {
1984 offset = offset,
1985 scale = 0.0006,
1986 spread = {x = 250, y = 250, z = 250},
1987 seed = seed,
1988 octaves = 3,
1989 persist = 0.66
1991 biomes = biomes,
1992 y_min = y,
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",
1999 -- Huge spruce
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"})
2009 -- Common spruce
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"},
2035 sidelen = 16,
2036 noise_params = {
2037 offset = 0.004,
2038 scale = 0.0022,
2039 spread = {x = 250, y = 250, z = 250},
2040 seed = 2500,
2041 octaves = 3,
2042 persist = 0.66
2044 biomes = {"Taiga", "ColdTaiga"},
2045 y_min = 2,
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"},
2055 sidelen = 80,
2056 noise_params = {
2057 offset = -0.025,
2058 scale = 0.025,
2059 spread = {x = 250, y = 250, z = 250},
2060 seed = 2566,
2061 octaves = 5,
2062 persist = 0.60,
2064 biomes = {"Taiga", "ColdTaiga"},
2065 y_min = 3,
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"},
2075 sidelen = 16,
2076 noise_params = {
2077 offset = -0.00075,
2078 scale = -0.0015,
2079 spread = {x = 250, y = 250, z = 250},
2080 seed = 11,
2081 octaves = 3,
2082 persist = 0.7
2084 biomes = {"IcePlains"},
2085 y_min = 1,
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)
2092 for a=1, 7 do
2093 minetest.register_decoration({
2094 deco_type = "schematic",
2095 place_on = {"mcl_core:dirt_with_dry_grass", "mcl_core:dirt", "mcl_core:coarse_dirt"},
2096 sidelen = 16,
2097 fill_ratio = 0.0002,
2098 biomes = {"Savanna", "SavannaM"},
2099 y_min = 1,
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",
2107 -- Birch
2108 minetest.register_decoration({
2109 deco_type = "schematic",
2110 place_on = {"group:grass_block_no_snow"},
2111 sidelen = 16,
2112 noise_params = {
2113 offset = 0.03,
2114 scale = 0.0025,
2115 spread = {x = 250, y = 250, z = 250},
2116 seed = 11,
2117 octaves = 3,
2118 persist = 0.66
2120 biomes = {"BirchForest"},
2121 y_min = 1,
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"},
2129 sidelen = 16,
2130 noise_params = {
2131 offset = 0.03,
2132 scale = 0.0025,
2133 spread = {x = 250, y = 250, z = 250},
2134 seed = 11,
2135 octaves = 3,
2136 persist = 0.66
2138 biomes = {"BirchForestM"},
2139 y_min = 1,
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"},
2148 sidelen = 16,
2149 noise_params = {
2150 offset = 0.000333,
2151 scale = -0.0015,
2152 spread = {x = 250, y = 250, z = 250},
2153 seed = 11,
2154 octaves = 3,
2155 persist = 0.66
2157 biomes = {"Forest", "FlowerForest"},
2158 y_min = 1,
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",
2164 -- Dark Oak
2165 minetest.register_decoration({
2166 deco_type = "schematic",
2167 place_on = {"group:grass_block_no_snow"},
2168 sidelen = 16,
2169 noise_params = {
2170 offset = 0.05,
2171 scale = 0.0015,
2172 spread = {x = 125, y = 125, z = 125},
2173 seed = 223,
2174 octaves = 3,
2175 persist = 0.66
2177 biomes = {"RoofedForest"},
2178 y_min = 4,
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" },
2197 sidelen = 80,
2198 fill_ratio = ratio_mushroom_huge,
2199 biomes = { "RoofedForest" },
2200 y_min = 1,
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" },
2209 sidelen = 80,
2210 fill_ratio = ratio_mushroom_giant,
2211 biomes = { "RoofedForest" },
2212 y_min = 1,
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" },
2222 sidelen = 80,
2223 fill_ratio = ratio_mushroom_mycelium_huge,
2224 biomes = { "MushroomIsland", "MushroomIslandShore" },
2225 y_min = 1,
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" },
2234 sidelen = 80,
2235 fill_ratio = ratio_mushroom_mycelium_giant,
2236 biomes = { "MushroomIsland", "MushroomIslandShore" },
2237 y_min = 1,
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" },
2248 sidelen = 80,
2249 fill_ratio = ratio_mushroom_huge,
2250 biomes = { "RoofedForest" },
2251 y_min = 1,
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" },
2260 sidelen = 80,
2261 fill_ratio = ratio_mushroom_giant,
2262 biomes = { "RoofedForest" },
2263 y_min = 1,
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" },
2273 sidelen = 80,
2274 fill_ratio = ratio_mushroom_mycelium_huge,
2275 biomes = { "MushroomIsland", "MushroomIslandShore" },
2276 y_min = 1,
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" },
2285 sidelen = 80,
2286 fill_ratio = ratio_mushroom_mycelium_giant,
2287 biomes = { "MushroomIsland", "MushroomIslandShore" },
2288 y_min = 1,
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"},
2299 sidelen = 80,
2300 noise_params = {
2301 offset = 0.00015,
2302 scale = 0.001,
2303 spread = {x = 300, y = 300, z = 300},
2304 seed = 775703,
2305 octaves = 4,
2306 persist = 0.63,
2308 biomes = {"MegaTaiga", "MegaSpruceTaiga"},
2309 y_min = 1,
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"},
2319 sidelen = 80,
2320 noise_params = {
2321 offset = 0.001,
2322 scale = 0.001,
2323 spread = {x = 300, y = 300, z = 300},
2324 seed = 775703,
2325 octaves = 4,
2326 persist = 0.63,
2328 biomes = {"MegaTaiga", "MegaSpruceTaiga"},
2329 y_min = 1,
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",
2335 -- Cacti
2336 minetest.register_decoration({
2337 deco_type = "simple",
2338 place_on = {"group:sand"},
2339 sidelen = 16,
2340 noise_params = {
2341 offset = -0.012,
2342 scale = 0.024,
2343 spread = {x = 100, y = 100, z = 100},
2344 seed = 257,
2345 octaves = 3,
2346 persist = 0.6
2348 y_min = 4,
2349 y_max = mcl_vars.mg_overworld_max,
2350 decoration = "mcl_core:cactus",
2351 biomes = {"Desert","Mesa","Mesa_sandlevel","MesaPlateauF","MesaPlateauF_sandlevel"},
2352 height = 1,
2353 height_max = 3,
2356 -- Sugar canes
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"},
2360 sidelen = 16,
2361 noise_params = {
2362 offset = -0.3,
2363 scale = 0.7,
2364 spread = {x = 200, y = 200, z = 200},
2365 seed = 2,
2366 octaves = 3,
2367 persist = 0.7
2369 y_min = 1,
2370 y_max = mcl_vars.mg_overworld_max,
2371 decoration = "mcl_core:reeds",
2372 height = 1,
2373 height_max = 3,
2374 spawn_by = { "mcl_core:water_source", "group:frosted_ice" },
2375 num_spawn_by = 1,
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"},
2380 sidelen = 16,
2381 noise_params = {
2382 offset = 0.0,
2383 scale = 0.5,
2384 spread = {x = 200, y = 200, z = 200},
2385 seed = 2,
2386 octaves = 3,
2387 persist = 0.7,
2389 biomes = {"Swampland", "Swampland_shore"},
2390 y_min = 1,
2391 y_max = mcl_vars.mg_overworld_max,
2392 decoration = "mcl_core:reeds",
2393 height = 1,
2394 height_max = 3,
2395 spawn_by = { "mcl_core:water_source", "group:frosted_ice" },
2396 num_spawn_by = 1,
2399 local dry_index = minetest.registered_nodes["mcl_core:dirt_with_dry_grass"]._mcl_grass_palette_index
2401 -- Doubletall grass
2402 local register_doubletall_grass = function(offset, scale, biomes, param2)
2404 minetest.register_decoration({
2405 deco_type = "schematic",
2406 schematic = {
2407 size = { x=1, y=3, z=1 },
2408 data = {
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 },
2414 replacements = {
2415 ["mcl_flowers:tallgrass"] = "mcl_flowers:double_grass",
2417 place_on = {"group:grass_block_no_snow"},
2418 sidelen = 16,
2419 noise_params = {
2420 offset = offset,
2421 scale = scale,
2422 spread = {x = 200, y = 200, z = 200},
2423 seed = 420,
2424 octaves = 3,
2425 persist = 0.6,
2427 y_min = 1,
2428 y_max = mcl_vars.mg_overworld_max,
2429 biomes = biomes,
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)
2437 -- Large ferns
2438 local register_double_fern = function(offset, scale, biomes)
2439 minetest.register_decoration({
2440 deco_type = "schematic",
2441 schematic = {
2442 size = { x=1, y=3, z=1 },
2443 data = {
2444 { name = "air", prob = 0 },
2445 { name = "mcl_flowers:double_fern", param1=255, },
2446 { name = "mcl_flowers:double_fern_top", param1=255, },
2449 replacements = {
2450 ["mcl_flowers:fern"] = "mcl_flowers:double_fern"
2452 place_on = {"group:grass_block_no_snow", "mcl_core:podzol"},
2453 sidelen = 16,
2454 noise_params = {
2455 offset = offset,
2456 scale = scale,
2457 spread = {x = 250, y = 250, z = 250},
2458 seed = 333,
2459 octaves = 2,
2460 persist = 0.66,
2462 biomes = biomes,
2463 y_min = 1,
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" })
2471 -- Large flowers
2472 local register_large_flower = function(name, biomes, seed, offset, flower_forest_offset)
2473 local maxi
2474 if flower_forest_offset then
2475 maxi = 2
2476 else
2477 maxi = 1
2479 for i=1, maxi do
2480 local o, b -- offset, biomes
2481 if i == 1 then
2482 o = offset
2483 b = biomes
2484 else
2485 o = flower_forest_offset
2486 b = { "FlowerForest" }
2489 minetest.register_decoration({
2490 deco_type = "schematic",
2491 schematic = {
2492 size = { x=1, y=3, z=1 },
2493 data = {
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"},
2501 sidelen = 16,
2502 noise_params = {
2503 offset = o,
2504 scale = 0.01,
2505 spread = {x = 300, y = 300, z = 300},
2506 seed = seed,
2507 octaves = 5,
2508 persist = 0.62,
2510 y_min = 1,
2511 y_max = mcl_vars.mg_overworld_max,
2512 flags = "",
2513 biomes = b,
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)
2523 -- Jungle bush
2525 minetest.register_decoration({
2526 deco_type = "schematic",
2527 place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
2528 sidelen = 80,
2529 noise_params = {
2530 offset = 0.0196,
2531 scale = 0.025,
2532 spread = {x = 250, y = 250, z = 250},
2533 seed = 2930,
2534 octaves = 4,
2535 persist = 0.6,
2537 biomes = {"Jungle"},
2538 y_min = 3,
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"},
2546 sidelen = 80,
2547 noise_params = {
2548 offset = 0.05,
2549 scale = 0.025,
2550 spread = {x = 250, y = 250, z = 250},
2551 seed = 2930,
2552 octaves = 4,
2553 persist = 0.6,
2555 biomes = {"JungleM"},
2556 y_min = 1,
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"},
2564 sidelen = 80,
2565 noise_params = {
2566 offset = 0.0085,
2567 scale = 0.025,
2568 spread = {x = 250, y = 250, z = 250},
2569 seed = 2930,
2570 octaves = 4,
2571 persist = 0.6,
2573 biomes = {"JungleEdge", "JungleEdgeM"},
2574 y_min = 3,
2575 y_max = mcl_vars.mg_overworld_max,
2576 schematic = jungle_bush_schematic,
2577 flags = "place_center_x, place_center_z",
2580 -- Fallen logs
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"},
2587 sidelen = 80,
2588 noise_params = {
2589 offset = 0.00018,
2590 scale = 0.00011,
2591 spread = {x = 250, y = 250, z = 250},
2592 seed = 2,
2593 octaves = 3,
2594 persist = 0.66
2596 biomes = {"MegaTaiga", "MegaSpruceTaiga", "Taiga"},
2597 y_min = 1,
2598 y_max = mcl_vars.mg_overworld_max,
2599 schematic = {
2600 size = {x = 3, y = 3, z = 1},
2601 data = {
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"},
2620 sidelen = 80,
2621 noise_params = {
2622 offset = 0.00018,
2623 scale = 0.00011,
2624 spread = {x = 250, y = 250, z = 250},
2625 seed = 2,
2626 octaves = 3,
2627 persist = 0.66
2629 biomes = {"ColdTaiga"},
2630 y_min = 1,
2631 y_max = mcl_vars.mg_overworld_max,
2632 schematic = {
2633 size = {x = 3, y = 3, z = 1},
2634 data = {
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"},
2653 sidelen = 16,
2654 noise_params = {
2655 offset = 0.0,
2656 scale = -0.00008,
2657 spread = {x = 250, y = 250, z = 250},
2658 seed = 2,
2659 octaves = 3,
2660 persist = 0.66
2662 biomes = {"BirchForest", "BirchForestM",},
2663 y_min = 1,
2664 y_max = mcl_vars.mg_overworld_max,
2665 schematic = {
2666 size = {x = 3, y = 3, z = 1},
2667 data = {
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"},
2686 sidelen = 80,
2687 fill_ratio = 0.005,
2688 biomes = {"Jungle", "JungleM"},
2689 y_min = 1,
2690 y_max = mcl_vars.mg_overworld_max,
2691 schematic = {
2692 size = {x = 3, y = 3, z = 1},
2693 data = {
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"},
2712 sidelen = 16,
2713 noise_params = {
2714 offset = 0.00018,
2715 scale = 0.00011,
2716 spread = {x = 250, y = 250, z = 250},
2717 seed = 2,
2718 octaves = 3,
2719 persist = 0.66
2721 biomes = {"Forest"},
2722 y_min = 1,
2723 y_max = mcl_vars.mg_overworld_max,
2724 schematic = {
2725 size = {x = 3, y = 3, z = 1},
2726 data = {
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",
2743 -- Lily pad
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
2752 local lilydepth = 2
2754 for d=1, lilydepth do
2755 local height = d + 2
2756 local y = 1 - d
2757 table.insert(lily_schem, 1, { name = "air", prob = 0 })
2759 minetest.register_decoration({
2760 deco_type = "schematic",
2761 schematic = {
2762 size = { x=1, y=height, z=1 },
2763 data = lily_schem,
2765 place_on = "mcl_core:dirt",
2766 sidelen = 16,
2767 noise_params = {
2768 offset = 0,
2769 scale = 0.3,
2770 spread = {x = 100, y = 100, z = 100},
2771 seed = 503,
2772 octaves = 6,
2773 persist = 0.7,
2775 y_min = y,
2776 y_max = y,
2777 biomes = { "Swampland_shore" },
2778 rotation = "random",
2782 -- Melon
2783 minetest.register_decoration({
2784 deco_type = "simple",
2785 place_on = {"group:grass_block_no_snow"},
2786 sidelen = 16,
2787 noise_params = {
2788 offset = -0.01,
2789 scale = 0.006,
2790 spread = {x = 250, y = 250, z = 250},
2791 seed = 333,
2792 octaves = 3,
2793 persist = 0.6
2795 y_min = 1,
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"},
2803 sidelen = 16,
2804 noise_params = {
2805 offset = 0.0,
2806 scale = 0.006,
2807 spread = {x = 250, y = 250, z = 250},
2808 seed = 333,
2809 octaves = 3,
2810 persist = 0.6
2812 y_min = 1,
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"},
2820 sidelen = 16,
2821 noise_params = {
2822 offset = -0.005,
2823 scale = 0.006,
2824 spread = {x = 250, y = 250, z = 250},
2825 seed = 333,
2826 octaves = 3,
2827 persist = 0.6
2829 y_min = 1,
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"},
2839 sidelen = 80,
2840 noise_params = {
2841 offset = 0.013,
2842 scale = 0.006,
2843 spread = {x = 125, y = 125, z = 125},
2844 seed = 333,
2845 octaves = 3,
2846 persist = 0.6
2848 y_min = 1,
2849 y_max = mcl_vars.mg_overworld_max,
2850 decoration = "mcl_farming:melon",
2851 biomes = { "JungleEdgeM" },
2854 -- Pumpkin
2855 minetest.register_decoration({
2856 deco_type = "schematic",
2857 schematic = {
2858 size = { x=1, y=2, z=1 },
2859 data = {
2860 { name = "air", prob = 0 },
2861 { name = "mcl_farming:pumpkin_face", param1=255, },
2864 place_on = {"group:grass_block_no_snow"},
2865 sidelen = 16,
2866 noise_params = {
2867 offset = -0.016,
2868 scale = 0.01332,
2869 spread = {x = 125, y = 125, z = 125},
2870 seed = 666,
2871 octaves = 6,
2872 persist = 0.666
2874 y_min = 1,
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"},
2923 sidelen = 16,
2924 noise_params = {
2925 offset = -0.08,
2926 scale = 0.09,
2927 spread = {x = 15, y = 15, z = 15},
2928 seed = 420,
2929 octaves = 3,
2930 persist = 0.6,
2932 biomes = {"IcePlains"},
2933 y_min = 1,
2934 y_max = mcl_vars.mg_overworld_max,
2935 schematic = {
2936 size = { x=1, y=2, z=1 },
2937 data = {
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"},
2946 sidelen = 16,
2947 noise_params = {
2948 offset = 0.0,
2949 scale = 0.09,
2950 spread = {x = 15, y = 15, z = 15},
2951 seed = 420,
2952 octaves = 3,
2953 persist = 0.6,
2955 biomes = {"ExtremeHills+_snowtop"},
2956 y_min = 1,
2957 y_max = mcl_vars.mg_overworld_max,
2958 schematic = {
2959 size = { x=1, y=2, z=1 },
2960 data = {
2961 { name = "mcl_core:dirt_with_grass", force_place=true, },
2962 { name = "mcl_flowers:tallgrass", },
2968 -- Dead bushes
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"},
2972 sidelen = 16,
2973 noise_params = {
2974 offset = 0,
2975 scale = 0.035,
2976 spread = {x = 100, y = 100, z = 100},
2977 seed = 1972,
2978 octaves = 3,
2979 persist = 0.6
2981 y_min = 4,
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",
2985 height = 1,
2988 -- Mushrooms in mushroom biome
2989 minetest.register_decoration({
2990 deco_type = "simple",
2991 place_on = {"mcl_core:mycelium"},
2992 sidelen = 80,
2993 fill_ratio = 0.009,
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"},
3003 sidelen = 80,
3004 fill_ratio = 0.009,
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"},
3015 sidelen = 80,
3016 fill_ratio = 0.003,
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"},
3025 sidelen = 80,
3026 fill_ratio = 0.003,
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"},
3042 sidelen = 16,
3043 noise_params = {
3044 offset = 0,
3045 scale = 0.003,
3046 spread = {x = 250, y = 250, z = 250},
3047 seed = mseeds[m],
3048 octaves = 3,
3049 persist = 0.66,
3051 y_min = 1,
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" },
3055 num_spawn_by = 1,
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"},
3062 sidelen = 16,
3063 noise_params = {
3064 offset = 0.05,
3065 scale = 0.003,
3066 spread = {x = 250, y = 250, z = 250},
3067 seed = mseeds[m],
3068 octaves = 3,
3069 persist = 0.6,
3071 y_min = 1,
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" },
3076 num_spawn_by = 1,
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
3083 if biomes then
3084 minetest.register_decoration({
3085 deco_type = "simple",
3086 place_on = {"group:grass_block_no_snow", "mcl_core:dirt"},
3087 sidelen = 16,
3088 noise_params = {
3089 offset = 0.0008,
3090 scale = 0.006,
3091 spread = {x = 100, y = 100, z = 100},
3092 seed = seed,
3093 octaves = 3,
3094 persist = 0.6
3096 y_min = 1,
3097 y_max = mcl_vars.mg_overworld_max,
3098 biomes = biomes,
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"},
3106 sidelen = 80,
3107 noise_params= {
3108 offset = 0.0008*40,
3109 scale = 0.003,
3110 spread = {x = 100, y = 100, z = 100},
3111 seed = seed,
3112 octaves = 3,
3113 persist = 0.6,
3115 y_min = 1,
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()
3143 -- TODO
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
3154 register_biomes()
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