Add Mesa Plateau F biome
[MineClone/MineClone2.git] / mods / MAPGEN / mcl_biomes / init.lua
blob39b03450f421e8abde25a64acf72ce34004ebb39
1 local mg_name = minetest.get_mapgen_setting("mg_name")
3 --
4 -- Register biomes
5 --
7 local function register_classic_superflat_biome()
8 -- Classic Superflat: bedrock (not part of biome), 2 dirt, 1 grass block
9 minetest.register_biome({
10 name = "flat",
11 node_top = "mcl_core:dirt_with_grass",
12 depth_top = 1,
13 node_filler = "mcl_core:dirt",
14 depth_filler = 3,
15 node_stone = "mcl_core:dirt",
16 y_min = mcl_vars.mg_overworld_min - 512,
17 y_max = mcl_vars.mg_overworld_max,
18 heat_point = 50,
19 humidity_point = 50,
21 end
23 -- All mapgens except mgv6, flat and singlenode
24 local function register_biomes()
25 --[[ OVERWORLD ]]
27 --[[ These biomes try to resemble MC as good as possible. This means especially the floor cover and
28 the type of plants and structures (shapes might differ). The terrain itself will be of course different
29 and depends on the mapgen.
30 Important: MC also takes the terrain into account while MT biomes don't care about the terrain at all
31 (except height).
32 MC has many “M” and “Hills” variants, most of which only differ in terrain compared to their original
33 counterpart.
34 In MT, any biome can occour in any terrain, so these variants are implied and are therefore
35 not explicitly implmented in MCL2. “M” variants are only included if they have another unique feature,
36 such as a different land cover.
37 In MCL2, MC biomes are usually split in two parts: A land part and an ocean part. Sometimes there's a beach/shore part as well.
39 The ocean biomes correspond to the MC Ocean biome.
41 Other intentionally missing biomes:
42 * River (generated by valleys and v7)
43 * Plateau (terrain only)
44 * Mesa (Bryce) (terrain only)
46 Tricky are the beach (esp. stone beach) and mushroom island biomes as they have specific conditions we can't check in MT. :(
47 TODO: Find a way to position these biomes accordingly.
49 Biomes TODO list:
50 * Savanna M (coarse dirt instead of dirt)
51 * Jungle Edge M (super rare but melons are common here)
52 * Mesa biomes
56 -- Ice Plains Spikes
57 minetest.register_biome({
58 name = "ice_plains_spikes",
59 node_top = "mcl_core:snowblock",
60 depth_top = 2,
61 node_filler = "mcl_core:snowblock",
62 depth_filler = 1,
63 node_water_top = "mcl_core:ice",
64 depth_water_top = 2,
65 node_river_water = "mcl_core:ice",
66 node_riverbed = "mcl_core:sand",
67 depth_riverbed = 2,
68 y_min = 1,
69 y_max = mcl_vars.mg_overworld_max,
70 heat_point = 0,
71 humidity_point = 73,
73 minetest.register_biome({
74 name = "ice_plains_spikes_ocean",
75 node_top = "mcl_core:gravel",
76 depth_top = 2,
77 node_filler = "mcl_core:dirt",
78 depth_filler = 3,
79 node_water_top = "mcl_core:ice",
80 depth_water_top = 2,
81 node_river_water = "mcl_core:ice",
82 node_riverbed = "mcl_core:sand",
83 depth_riverbed = 2,
84 y_min = mcl_vars.mg_overworld_min,
85 y_max = 0,
86 heat_point = 0,
87 humidity_point = 73,
90 -- Cold Taiga
91 minetest.register_biome({
92 name = "cold_taiga",
93 node_dust = "mcl_core:snow",
94 node_top = "mcl_core:dirt_with_grass_snow",
95 depth_top = 1,
96 node_filler = "mcl_core:dirt",
97 depth_filler = 2,
98 node_riverbed = "mcl_core:sand",
99 depth_riverbed = 2,
100 y_min = 3,
101 y_max = mcl_vars.mg_overworld_max,
102 heat_point = 0,
103 humidity_point = 40,
106 minetest.register_biome({
107 name = "cold_taiga_beach",
108 node_dust = "mcl_core:snow",
109 node_top = "mcl_core:sand",
110 depth_top = 1,
111 node_water_top = "mcl_core:ice",
112 depth_water_top = 1,
113 node_filler = "mcl_core:sand",
114 depth_filler = 2,
115 node_riverbed = "mcl_core:sand",
116 depth_riverbed = 2,
117 y_min = -3,
118 y_max = 2,
119 heat_point = 0,
120 humidity_point = 40,
123 minetest.register_biome({
124 name = "cold_taiga_ocean",
125 node_top = "mcl_core:dirt",
126 depth_top = 1,
127 node_filler = "mcl_core:dirt",
128 depth_filler = 3,
129 node_riverbed = "mcl_core:sand",
130 depth_riverbed = 2,
131 y_min = mcl_vars.mg_overworld_min,
132 y_max = -4,
133 heat_point = 0,
134 humidity_point = 40,
137 -- Mega Taiga
138 minetest.register_biome({
139 name = "mega_taiga",
140 node_top = "mcl_core:podzol",
141 depth_top = 1,
142 node_filler = "mcl_core:dirt",
143 depth_filler = 3,
144 node_riverbed = "mcl_core:sand",
145 depth_riverbed = 2,
146 y_min = 1,
147 y_max = mcl_vars.mg_overworld_max,
148 heat_point = 26,
149 humidity_point = 72,
152 minetest.register_biome({
153 name = "mega_taiga_ocean",
154 node_top = "mcl_core:dirt",
155 depth_top = 1,
156 node_filler = "mcl_core:dirt",
157 depth_filler = 3,
158 node_riverbed = "mcl_core:sand",
159 depth_riverbed = 2,
160 y_min = mcl_vars.mg_overworld_min,
161 y_max = 0,
162 heat_point = 26,
163 humidity_point = 72,
166 -- Mega Spruce Taiga
167 minetest.register_biome({
168 name = "mega_spruce_taiga",
169 node_top = "mcl_core:podzol",
170 depth_top = 1,
171 node_filler = "mcl_core:dirt",
172 depth_filler = 3,
173 node_riverbed = "mcl_core:sand",
174 depth_riverbed = 2,
175 y_min = 1,
176 y_max = mcl_vars.mg_overworld_max,
177 heat_point = 21,
178 humidity_point = 72,
181 minetest.register_biome({
182 name = "mega_spruce_taiga_ocean",
183 node_top = "mcl_core:dirt",
184 depth_top = 1,
185 node_filler = "mcl_core:dirt",
186 depth_filler = 3,
187 node_riverbed = "mcl_core:sand",
188 depth_riverbed = 2,
189 y_min = mcl_vars.mg_overworld_min,
190 y_max = 0,
191 heat_point = 21,
192 humidity_point = 72,
195 -- Extreme Hills
196 minetest.register_biome({
197 name = "extreme_hills",
198 node_top = "mcl_core:dirt_with_grass",
199 depth_top = 1,
200 node_filler = "mcl_core:dirt",
201 depth_filler = 4,
202 node_riverbed = "mcl_core:sand",
203 depth_riverbed = 4,
204 y_min = 4,
205 y_max = mcl_vars.mg_overworld_max,
206 heat_point = 31,
207 humidity_point = 30,
210 minetest.register_biome({
211 name = "extreme_hills_beach",
212 node_top = "mcl_core:sand",
213 depth_top = 1,
214 depth_water_top = 1,
215 node_filler = "mcl_core:sand",
216 depth_filler = 3,
217 node_riverbed = "mcl_core:sand",
218 depth_riverbed = 4,
219 y_min = -3,
220 y_max = 3,
221 heat_point = 31,
222 humidity_point = 30,
225 minetest.register_biome({
226 name = "extreme_hills_ocean",
227 node_top = "mcl_core:dirt",
228 depth_top = 1,
229 node_filler = "mcl_core:dirt",
230 depth_filler = 4,
231 node_riverbed = "mcl_core:sand",
232 depth_riverbed = 4,
233 y_min = mcl_vars.mg_overworld_min,
234 y_max = -4,
235 heat_point = 31,
236 humidity_point = 30,
239 -- Extreme Hills M
240 minetest.register_biome({
241 name = "extreme_hills_m",
242 node_top = "mcl_core:gravel",
243 depth_top = 1,
244 node_filler = "mcl_core:gravel",
245 depth_filler = 3,
246 node_riverbed = "mcl_core:gravel",
247 depth_riverbed = 3,
248 y_min = 1,
249 y_max = mcl_vars.mg_overworld_max,
250 heat_point = 28,
251 humidity_point = 30,
254 minetest.register_biome({
255 name = "extreme_hills_m_ocean",
256 node_top = "mcl_core:dirt",
257 depth_top = 1,
258 node_filler = "mcl_core:dirt",
259 depth_filler = 3,
260 node_riverbed = "mcl_core:sand",
261 depth_riverbed = 3,
262 y_min = mcl_vars.mg_overworld_min,
263 y_max = 0,
264 heat_point = 28,
265 humidity_point = 30,
268 -- Extreme Hills+
269 -- This biome is identical to Extreme Hills on the surface but has snow-covered mountains with spruce/oak
270 -- forests above a certain hight.
271 minetest.register_biome({
272 name = "extreme_hills_plus",
273 node_top = "mcl_core:dirt_with_grass",
274 depth_top = 1,
275 node_filler = "mcl_core:dirt",
276 depth_filler = 4,
277 node_riverbed = "mcl_core:sand",
278 depth_riverbed = 4,
279 y_min = 1,
280 y_max = 44,
281 heat_point = 31,
282 humidity_point = 35,
285 ---- Sub-biome Extra biome for Extreme Hills+ for those snow forests
286 minetest.register_biome({
287 name = "extreme_hills_plus_snowtop",
288 node_dust = "mcl_core:snow",
289 node_top = "mcl_core:dirt_with_grass_snow",
290 depth_top = 1,
291 node_filler = "mcl_core:dirt",
292 depth_filler = 4,
293 node_riverbed = "mcl_core:sand",
294 depth_riverbed = 4,
295 y_min = 45,
296 y_max = mcl_vars.mg_overworld_max,
297 heat_point = 31,
298 humidity_point = 35,
301 minetest.register_biome({
302 name = "extreme_hills_plus_ocean",
303 node_top = "mcl_core:dirt",
304 depth_top = 1,
305 node_filler = "mcl_core:dirt",
306 depth_filler = 4,
307 node_riverbed = "mcl_core:sand",
308 depth_riverbed = 4,
309 y_min = mcl_vars.mg_overworld_min,
310 y_max = 0,
311 heat_point = 31,
312 humidity_point = 35,
315 -- Stone Beach
316 minetest.register_biome({
317 name = "stone_beach",
318 y_min = -6,
319 y_max = mcl_vars.mg_overworld_max,
320 heat_point = 31,
321 humidity_point = 15,
323 minetest.register_biome({
324 name = "stone_beach_ocean",
325 node_top = "mcl_core:dirt",
326 depth_top = 1,
327 node_filler = "mcl_core:dirt",
328 filler_depth = 2,
329 node_riverbed = "mcl_core:sand",
330 depth_riverbed = 1,
331 y_min = mcl_vars.mg_overworld_min,
332 y_max = -7,
333 heat_point = 31,
334 humidity_point = 15,
337 -- Ice Plains
338 minetest.register_biome({
339 name = "ice_plains",
340 node_dust = "mcl_core:snow",
341 node_top = "mcl_core:dirt_with_grass_snow",
342 depth_top = 1,
343 node_filler = "mcl_core:dirt",
344 depth_filler = 2,
345 node_water_top = "mcl_core:ice",
346 depth_water_top = 2,
347 node_river_water = "mcl_core:ice",
348 node_riverbed = "mcl_core:sand",
349 depth_riverbed = 2,
350 y_min = 1,
351 y_max = mcl_vars.mg_overworld_max,
352 heat_point = 13,
353 humidity_point = 79,
356 minetest.register_biome({
357 name = "ice_plains_ocean",
358 node_top = "mcl_core:dirt",
359 depth_top = 1,
360 node_filler = "mcl_core:dirt",
361 depth_filler = 3,
362 node_riverbed = "mcl_core:sand",
363 depth_riverbed = 2,
364 y_min = mcl_vars.mg_overworld_min,
365 y_max = 0,
366 heat_point = 13,
367 humidity_point = 79,
370 -- Plains
371 minetest.register_biome({
372 name = "plains",
373 node_top = "mcl_core:dirt_with_grass",
374 depth_top = 1,
375 node_filler = "mcl_core:dirt",
376 depth_filler = 2,
377 node_riverbed = "mcl_core:sand",
378 depth_riverbed = 2,
379 y_min = 4,
380 y_max = mcl_vars.mg_overworld_max,
381 heat_point = 26,
382 humidity_point = 45,
385 minetest.register_biome({
386 name = "plains_beach",
387 node_top = "mcl_core:sand",
388 depth_top = 1,
389 node_filler = "mcl_core:sand",
390 depth_filler = 2,
391 node_riverbed = "mcl_core:sand",
392 depth_riverbed = 2,
393 y_min = 3,
394 y_max = 1,
395 heat_point = 26,
396 humidity_point = 45,
399 minetest.register_biome({
400 name = "plains_ocean",
401 node_top = "mcl_core:dirt",
402 depth_top = 1,
403 node_filler = "mcl_core:dirt",
404 depth_filler = 3,
405 node_riverbed = "mcl_core:sand",
406 depth_riverbed = 2,
407 y_min = mcl_vars.mg_overworld_min,
408 y_max = 0,
409 heat_point = 26,
410 humidity_point = 45,
413 -- TODO: Sunflower Plains
414 --[[
415 minetest.register_biome({
416 name = "sunflower_plains",
417 node_top = "mcl_core:dirt_with_grass",
418 depth_top = 1,
419 node_filler = "mcl_core:dirt",
420 depth_filler = 2,
421 node_riverbed = "mcl_core:sand",
422 depth_riverbed = 2,
423 y_min = 4,
424 y_max = mcl_vars.mg_overworld_max,
425 heat_point = 26,
426 humidity_point = 22.5,
429 minetest.register_biome({
430 name = "sunflower_plains_ocean",
431 node_top = "mcl_core:dirt",
432 depth_top = 1,
433 node_filler = "mcl_core:dirt",
434 depth_filler = 3,
435 node_riverbed = "mcl_core:dirt",
436 depth_riverbed = 2,
437 y_min = mcl_vars.mg_overworld_min,
438 y_max = 0,
439 heat_point = 26,
440 humidity_point = 22.5,
444 -- Taiga
445 minetest.register_biome({
446 name = "taiga",
447 node_top = "mcl_core:dirt_with_grass",
448 depth_top = 1,
449 node_filler = "mcl_core:dirt",
450 depth_filler = 3,
451 node_riverbed = "mcl_core:sand",
452 depth_riverbed = 2,
453 y_min = 4,
454 y_max = mcl_vars.mg_overworld_max,
455 heat_point = 47,
456 humidity_point = 73, --was 70
459 minetest.register_biome({
460 name = "taiga_beach",
461 node_top = "mcl_core:sand",
462 depth_top = 1,
463 node_filler = "mcl_core:dirt",
464 depth_filler = 3,
465 node_riverbed = "mcl_core:sand",
466 depth_riverbed = 2,
467 y_min = 1,
468 y_max = 3,
469 heat_point = 47,
470 humidity_point = 73, --was 70
473 minetest.register_biome({
474 name = "taiga_ocean",
475 node_top = "mcl_core:sand",
476 depth_top = 1,
477 node_filler = "mcl_core:dirt",
478 depth_filler = 3,
479 node_riverbed = "mcl_core:sand",
480 depth_riverbed = 2,
481 y_min = mcl_vars.mg_overworld_min,
482 y_max = 0,
483 heat_point = 47,
484 humidity_point = 73, --was 70
487 -- Forest
488 minetest.register_biome({
489 name = "forest",
490 node_top = "mcl_core:dirt_with_grass",
491 depth_top = 1,
492 node_filler = "mcl_core:dirt",
493 depth_filler = 3,
494 node_riverbed = "mcl_core:sand",
495 depth_riverbed = 2,
496 y_min = 1,
497 y_max = mcl_vars.mg_overworld_max,
498 heat_point = 33,
499 humidity_point = 44, --was 68
502 minetest.register_biome({
503 name = "forest_beach",
504 node_top = "mcl_core:sand",
505 depth_top = 1,
506 node_filler = "mcl_core:dirt",
507 depth_filler = 3,
508 node_riverbed = "mcl_core:sand",
509 depth_riverbed = 2,
510 y_min = -1,
511 y_max = 0,
512 heat_point = 33,
513 humidity_point = 44, --was 68
516 minetest.register_biome({
517 name = "forest_ocean",
518 node_top = "mcl_core:dirt",
519 depth_top = 1,
520 node_filler = "mcl_core:dirt",
521 depth_filler = 3,
522 node_riverbed = "mcl_core:sand",
523 depth_riverbed = 2,
524 y_min = mcl_vars.mg_overworld_min,
525 y_max = -2,
526 heat_point = 33,
527 humidity_point = 44, --was 68
530 -- Flower Forest
531 minetest.register_biome({
532 name = "flower_forest",
533 node_top = "mcl_core:dirt_with_grass",
534 depth_top = 1,
535 node_filler = "mcl_core:dirt",
536 depth_filler = 3,
537 node_riverbed = "mcl_core:sand",
538 depth_riverbed = 2,
539 y_min = 2,
540 y_max = mcl_vars.mg_overworld_max,
541 heat_point = 33,
542 humidity_point = 51,
545 minetest.register_biome({
546 name = "flower_forest_beach",
547 node_top = "mcl_core:sand",
548 depth_top = 1,
549 node_filler = "mcl_core:dirt",
550 depth_filler = 3,
551 node_riverbed = "mcl_core:sand",
552 depth_riverbed = 2,
553 y_min = -2,
554 y_max = 1,
555 heat_point = 33,
556 humidity_point = 51,
559 minetest.register_biome({
560 name = "flower_forest_ocean",
561 node_top = "mcl_core:dirt",
562 depth_top = 1,
563 node_filler = "mcl_core:dirt",
564 depth_filler = 3,
565 node_riverbed = "mcl_core:sand",
566 depth_riverbed = 2,
567 y_min = mcl_vars.mg_overworld_min,
568 y_max = -3,
569 heat_point = 33,
570 humidity_point = 51,
573 -- Birch Forest
574 minetest.register_biome({
575 name = "birch_forest",
576 node_top = "mcl_core:dirt_with_grass",
577 depth_top = 1,
578 node_filler = "mcl_core:dirt",
579 depth_filler = 3,
580 node_riverbed = "mcl_core:sand",
581 depth_riverbed = 2,
582 y_min = 1,
583 y_max = mcl_vars.mg_overworld_max,
584 heat_point = 20,
585 humidity_point = 49,
588 minetest.register_biome({
589 name = "birch_forest_ocean",
590 node_top = "mcl_core:dirt",
591 depth_top = 1,
592 node_filler = "mcl_core:dirt",
593 depth_filler = 3,
594 node_riverbed = "mcl_core:sand",
595 depth_riverbed = 2,
596 y_min = mcl_vars.mg_overworld_min,
597 y_max = 0,
598 heat_point = 20,
599 humidity_point = 49,
602 -- Birch Forest M
603 minetest.register_biome({
604 name = "birch_forest_m",
605 node_top = "mcl_core:dirt_with_grass",
606 depth_top = 1,
607 node_filler = "mcl_core:dirt",
608 depth_filler = 3,
609 node_riverbed = "mcl_core:sand",
610 depth_riverbed = 2,
611 y_min = 1,
612 y_max = mcl_vars.mg_overworld_max,
613 heat_point = 20,
614 humidity_point = 44,
617 minetest.register_biome({
618 name = "birch_forest_m_ocean",
619 node_top = "mcl_core:dirt",
620 depth_top = 1,
621 node_filler = "mcl_core:dirt",
622 depth_filler = 3,
623 node_riverbed = "mcl_core:sand",
624 depth_riverbed = 2,
625 y_min = mcl_vars.mg_overworld_min,
626 y_max = 0,
627 heat_point = 20,
628 humidity_point = 44,
631 -- Desert (Red Sand)
632 -- FIXME: Not a real biome in MC
633 --[[
634 minetest.register_biome({
635 name = "red_desert",
636 node_top = "mcl_core:redsand",
637 depth_top = 1,
638 node_filler = "mcl_core:redsand",
639 depth_filler = 2,
640 node_riverbed = "mcl_core:sand",
641 depth_riverbed = 2,
642 node_stone = "mcl_core:redsandstone",
643 y_min = 1,
644 y_max = mcl_vars.mg_overworld_max,
645 heat_point = 64,
646 humidity_point = 37, --was 16
649 minetest.register_biome({
650 name = "red_desert_ocean",
651 node_top = "mcl_core:redsand",
652 depth_top = 1,
653 node_filler = "mcl_core:redsand",
654 depth_filler = 3,
655 node_riverbed = "mcl_core:redsand",
656 depth_riverbed = 2,
657 y_min = mcl_vars.mg_overworld_min,
658 y_max = 0,
659 heat_point = 64,
660 humidity_point = 37, --was 16
664 -- Desert
665 minetest.register_biome({
666 name = "desert",
667 node_top = "mcl_core:sand",
668 depth_top = 1,
669 node_filler = "mcl_core:sand",
670 depth_filler = 2,
671 node_riverbed = "mcl_core:sand",
672 depth_riverbed = 2,
673 node_stone = "mcl_core:sandstone",
674 y_min = 1,
675 y_max = mcl_vars.mg_overworld_max,
676 heat_point = 57,
677 humidity_point = 0, --was 0
680 minetest.register_biome({
681 name = "desert_ocean",
682 node_top = "mcl_core:sand",
683 depth_top = 1,
684 node_filler = "mcl_core:sand",
685 depth_filler = 3,
686 node_riverbed = "mcl_core:sand",
687 depth_riverbed = 2,
688 y_min = mcl_vars.mg_overworld_min,
689 y_max = 0,
690 heat_point = 57,
691 humidity_point = 0, --was 0
694 -- Roofed Forest
695 minetest.register_biome({
696 name = "roofed_forest",
697 node_top = "mcl_core:dirt_with_grass",
698 depth_top = 1,
699 node_filler = "mcl_core:dirt",
700 depth_filler = 2,
701 node_riverbed = "mcl_core:sand",
702 depth_riverbed = 2,
703 y_min = 1,
704 y_max = mcl_vars.mg_overworld_max,
705 heat_point = 26,
706 humidity_point = 0,
709 minetest.register_biome({
710 name = "roofed_forest_ocean",
711 node_top = "mcl_core:dirt",
712 depth_top = 1,
713 node_filler = "mcl_core:dirt",
714 depth_filler = 1,
715 node_riverbed = "mcl_core:sand",
716 depth_riverbed = 2,
717 y_min = mcl_vars.mg_overworld_min,
718 y_max = 0,
719 heat_point = 26,
720 humidity_point = 0,
723 -- Mesa
724 minetest.register_biome({
725 name = "mesa",
726 node_top = "mcl_colorblocks:hardened_clay",
727 depth_top = 1,
728 node_filler = "mcl_colorblocks:hardened_clay",
729 node_stone = "mcl_colorblocks:hardened_clay",
730 y_min = 11,
731 y_max = mcl_vars.mg_overworld_max,
732 heat_point = 88,
733 humidity_point = 20,
736 -- Helper biome for the red sand at the bottom of mesas.
737 -- This is part of the regular mesa.
738 minetest.register_biome({
739 name = "mesa_sandlevel",
740 node_top = "mcl_core:redsand",
741 depth_top = 1,
742 node_filler = "mcl_colorblocks:hardened_clay_orange",
743 depth_filler = 3,
744 node_riverbed = "mcl_core:redsand",
745 depth_riverbed = 1,
746 node_stone = "mcl_colorblocks:hardened_clay_orange",
747 y_min = 1,
748 y_max = 10,
749 heat_point = 88,
750 humidity_point = 20,
753 minetest.register_biome({
754 name = "mesa_ocean",
755 node_top = "mcl_core:redsand",
756 depth_top = 3,
757 node_filler = "mcl_colorblocks:hardened_clay",
758 depth_filler = 2,
759 node_riverbed = "mcl_core:redsand",
760 depth_riverbed = 2,
761 y_min = mcl_vars.mg_overworld_min,
762 y_max = 0,
763 heat_point = 88,
764 humidity_point = 20,
767 -- Mesa Plateau F
768 -- Identical to Mesa below Y=30. Y=30 and above is replaced with an oak forest
769 minetest.register_biome({
770 name = "mesa_plateau_f",
771 node_top = "mcl_colorblocks:hardened_clay",
772 depth_top = 1,
773 node_filler = "mcl_colorblocks:hardened_clay",
774 node_stone = "mcl_colorblocks:hardened_clay",
775 y_min = 11,
776 y_max = 29,
777 heat_point = 64,
778 humidity_point = 37,
781 -- The actual plateau of this biome
782 -- This is a mesa plateau for grass blocks, tall grass and oaks.
783 minetest.register_biome({
784 name = "mesa_plateau_f_grasstop",
785 node_top = "mcl_core:dirt_with_grass",
786 depth_top = 1,
787 node_filler = "mcl_core:dirt",
788 filler_depth = 1,
789 node_stone = "mcl_colorblocks:hardened_clay",
790 y_min = 30,
791 y_max = mcl_vars.mg_overworld_max,
792 heat_point = 64,
793 humidity_point = 37,
796 -- Helper biome for the red sand at the bottom.
797 minetest.register_biome({
798 name = "mesa_plateau_f_sandlevel",
799 node_top = "mcl_core:redsand",
800 depth_top = 1,
801 node_filler = "mcl_colorblocks:hardened_clay_orange",
802 depth_filler = 3,
803 node_riverbed = "mcl_core:redsand",
804 depth_riverbed = 1,
805 node_stone = "mcl_colorblocks:hardened_clay_orange",
806 y_min = 1,
807 y_max = 10,
808 heat_point = 64,
809 humidity_point = 37,
812 minetest.register_biome({
813 name = "mesa_plateau_f_ocean",
814 node_top = "mcl_core:dirt",
815 depth_top = 3,
816 node_filler = "mcl_core:dirt",
817 depth_filler = 2,
818 node_riverbed = "mcl_core:redsand",
819 depth_riverbed = 2,
820 y_min = mcl_vars.mg_overworld_min,
821 y_max = 0,
822 heat_point = 64,
823 humidity_point = 37,
826 -- Savanna
827 minetest.register_biome({
828 name = "savanna",
829 node_top = "mcl_core:dirt_with_grass",
830 depth_top = 1,
831 node_filler = "mcl_core:coarse_dirt",
832 depth_filler = 2,
833 node_riverbed = "mcl_core:sand",
834 depth_riverbed = 2,
835 y_min = 1,
836 y_max = mcl_vars.mg_overworld_max,
837 heat_point = 50,
838 humidity_point = 46,
841 minetest.register_biome({
842 name = "savanna_beach",
843 node_top = "mcl_core:sand",
844 depth_top = 1,
845 node_filler = "mcl_core:dirt",
846 depth_filler = 3,
847 node_riverbed = "mcl_core:sand",
848 depth_riverbed = 2,
849 y_min = -1,
850 y_max = 0,
851 heat_point = 50,
852 humidity_point = 46,
855 minetest.register_biome({
856 name = "savanna_ocean",
857 node_top = "mcl_core:dirt",
858 depth_top = 1,
859 node_filler = "mcl_core:coarse_dirt",
860 depth_filler = 3,
861 node_riverbed = "mcl_core:sand",
862 depth_riverbed = 2,
863 y_min = mcl_vars.mg_overworld_min,
864 y_max = -2,
865 heat_point = 50,
866 humidity_point = 46,
869 -- Jungle
870 minetest.register_biome({
871 name = "jungle",
872 node_top = "mcl_core:dirt_with_grass",
873 depth_top = 1,
874 node_filler = "mcl_core:dirt",
875 depth_filler = 3,
876 node_riverbed = "mcl_core:sand",
877 depth_riverbed = 2,
878 y_min = 1,
879 y_max = mcl_vars.mg_overworld_max,
880 heat_point = 90,
881 humidity_point = 91,
884 minetest.register_biome({
885 name = "jungle_shore",
886 node_top = "mcl_core:dirt",
887 depth_top = 1,
888 node_filler = "mcl_core:dirt",
889 depth_filler = 3,
890 node_riverbed = "mcl_core:sand",
891 depth_riverbed = 2,
892 y_min = -1,
893 y_max = 0,
894 heat_point = 90,
895 humidity_point = 91,
898 minetest.register_biome({
899 name = "jungle_ocean",
900 node_top = "mcl_core:dirt",
901 depth_top = 1,
902 node_filler = "mcl_core:dirt",
903 depth_filler = 3,
904 node_riverbed = "mcl_core:sand",
905 depth_riverbed = 2,
906 y_min = mcl_vars.mg_overworld_min,
907 y_max = -2,
908 heat_point = 90,
909 humidity_point = 91,
912 -- Jungle Edge
913 minetest.register_biome({
914 name = "jungle_edge",
915 node_top = "mcl_core:dirt_with_grass",
916 depth_top = 1,
917 node_filler = "mcl_core:dirt",
918 depth_filler = 3,
919 node_riverbed = "mcl_core:sand",
920 depth_riverbed = 2,
921 y_min = 1,
922 y_max = mcl_vars.mg_overworld_max,
923 heat_point = 90,
924 humidity_point = 87,
927 minetest.register_biome({
928 name = "jungle_edge_shore",
929 node_top = "mcl_core:dirt",
930 depth_top = 1,
931 node_filler = "mcl_core:dirt",
932 depth_filler = 3,
933 node_riverbed = "mcl_core:sand",
934 depth_riverbed = 2,
935 y_min = -1,
936 y_max = 0,
937 heat_point = 90,
938 humidity_point = 87,
941 minetest.register_biome({
942 name = "jungle_edge_ocean",
943 node_top = "mcl_core:dirt",
944 depth_top = 1,
945 node_filler = "mcl_core:dirt",
946 depth_filler = 3,
947 node_riverbed = "mcl_core:sand",
948 depth_riverbed = 2,
949 y_min = mcl_vars.mg_overworld_min,
950 y_max = -2,
951 heat_point = 90,
952 humidity_point = 87,
955 -- Swampland
956 minetest.register_biome({
957 name = "swampland",
958 node_top = "mcl_core:dirt_with_grass",
959 depth_top = 1,
960 node_filler = "mcl_core:dirt",
961 depth_filler = 3,
962 node_riverbed = "mcl_core:sand",
963 depth_riverbed = 2,
964 y_min = 1,
965 -- Note: Limited in height!
966 y_max = 23,
967 heat_point = 60,
968 humidity_point = 99,
971 minetest.register_biome({
972 name = "swampland_shore",
973 node_top = "mcl_core:dirt",
974 depth_top = 1,
975 node_filler = "mcl_core:dirt",
976 depth_filler = 3,
977 node_riverbed = "mcl_core:sand",
978 depth_riverbed = 2,
979 y_min = -4,
980 y_max = 0,
981 heat_point = 60,
982 humidity_point = 99,
985 minetest.register_biome({
986 name = "swampland_ocean",
987 node_top = "mcl_core:sand",
988 depth_top = 1,
989 node_filler = "mcl_core:sand",
990 depth_filler = 3,
991 node_riverbed = "mcl_core:sand",
992 depth_riverbed = 2,
993 y_min = 20,
994 y_max = -4,
995 heat_point = 60,
996 humidity_point = 99,
999 -- Mushroom Island / Mushroom Island Shore
1000 -- TODO: Make sure these biomes only spawn in islands
1001 minetest.register_biome({
1002 name = "mushroom_island",
1003 node_top = "mcl_core:mycelium",
1004 depth_top = 1,
1005 node_filler = "mcl_core:dirt",
1006 depth_filler = 3,
1007 node_riverbed = "mcl_core:sand",
1008 depth_riverbed = 2,
1009 y_min = 4,
1010 -- Note: Limited in height!
1011 y_max = 20,
1012 heat_point = 99,
1013 humidity_point = 99,
1016 minetest.register_biome({
1017 name = "mushroom_island_shore",
1018 node_top = "mcl_core:mycelium",
1019 depth_top = 1,
1020 node_filler = "mcl_core:dirt",
1021 depth_filler = 3,
1022 node_riverbed = "mcl_core:sand",
1023 depth_riverbed = 2,
1024 y_min = 1,
1025 y_max = 3,
1026 heat_point = 99,
1027 humidity_point = 99,
1030 minetest.register_biome({
1031 name = "mushroom_island_ocean",
1032 node_top = "mcl_core:dirt",
1033 depth_top = 1,
1034 node_filler = "mcl_core:dirt",
1035 depth_filler = 3,
1036 node_riverbed = "mcl_core:sand",
1037 depth_riverbed = 2,
1038 y_min = mcl_vars.mg_overworld_min,
1039 y_max = 0,
1040 heat_point = 99,
1041 humidity_point = 99,
1046 -- Register biomes of non-Overworld biomes
1047 local function register_dimension_biomes()
1048 --[[ REALMS ]]
1050 --[[ THE NETHER ]]
1051 minetest.register_biome({
1052 name = "nether",
1053 node_filler = "mcl_nether:netherrack",
1054 node_stone = "mcl_nether:netherrack",
1055 node_water = "air",
1056 node_river_water = "air",
1057 y_min = mcl_vars.mg_nether_min,
1058 -- FIXME: For some reason the Nether stops generating early if this constant is not added.
1059 -- Figure out why.
1060 y_max = mcl_vars.mg_nether_max + 80,
1061 heat_point = 100,
1062 humidity_point = 0,
1065 --[[ THE END ]]
1066 minetest.register_biome({
1067 name = "end",
1068 node_stone = "air",
1069 node_filler = "air",
1070 node_water = "air",
1071 node_river_water = "air",
1072 -- FIXME: For some reason the End stops generating early if this constant is not added.
1073 -- Figure out why.
1074 y_min = mcl_vars.mg_end_min,
1075 y_max = mcl_vars.mg_end_max + 80,
1076 heat_point = 50,
1077 humidity_point = 50,
1082 -- Register “fake” ores directly related to the biomes
1083 local function register_biomelike_ores()
1085 -- Random coarse dirt floor in mega taiga
1086 minetest.register_ore({
1087 ore_type = "sheet",
1088 ore = "mcl_core:coarse_dirt",
1089 wherein = {"mcl_core:podzol", "mcl_core:dirt"},
1090 clust_scarcity = 1,
1091 clust_num_ores = 12,
1092 clust_size = 10,
1093 y_min = mcl_vars.mg_overworld_min,
1094 y_max = mcl_vars.mg_overworld_max,
1095 noise_threshold = 0.2,
1096 noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=24, octaves=3, persist=0.70},
1097 biomes = { "mega_taiga" },
1100 -- Small dirt patches in Extreme Hills M
1101 minetest.register_ore({
1102 ore_type = "blob",
1103 -- TODO: Should be grass block. But generating this as ore means gras blocks will spawn undeground. :-(
1104 ore = "mcl_core:dirt",
1105 wherein = {"mcl_core:gravel"},
1106 clust_scarcity = 5000,
1107 clust_num_ores = 12,
1108 clust_size = 4,
1109 y_min = mcl_vars.mg_overworld_min,
1110 y_max = mcl_vars.mg_overworld_max,
1111 noise_threshold = 0.2,
1112 noise_params = {offset=0, scale=5, spread={x=250, y=250, z=250}, seed=64, octaves=3, persist=0.60},
1113 biomes = { "extreme_hills_m" },
1116 -- Mesa strata (registered as sheet ores)
1118 -- Helper function
1119 -- Colors to use: silver (light grey), brown, orange, red, yellow, white
1120 local stratum = function(y_min, height, color, seed)
1121 if not height then
1122 height = 1
1124 if not seed then
1125 seed = 39
1127 local y_max = y_min + height-1
1128 minetest.register_ore({
1129 ore_type = "sheet",
1130 ore = "mcl_colorblocks:hardened_clay_"..color,
1131 wherein = {"mcl_colorblocks:hardened_clay"},
1132 column_height_min = height,
1133 column_height_max = height,
1134 y_min = y_min,
1135 y_max = y_max,
1136 noise_threshold = -1.0,
1137 noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=seed, octaves=3, persist=0.70},
1138 biomes = { "mesa", "mesa_plateau_f" },
1142 stratum(11, 3, "orange")
1144 -- Create strata for up to Y = 256
1145 -- This is semi-random based on the mapseed.
1146 local seed = minetest.get_mapgen_setting("seed")
1147 local i = 0
1148 repeat
1149 seed = seed + i
1151 stratum(17+i, 1, "orange", seed)
1152 stratum(19+i, 1, "silver", seed)
1153 stratum(21+i, 1, "brown", seed)
1154 stratum(22+i, 1, "red", seed)
1155 stratum(24+i, 1, "silver", seed)
1156 stratum(26+i, 1, "brown", seed)
1157 stratum(27+i, 1, "white", seed)
1158 stratum(29+i, 1, "orange", seed)
1159 stratum(34+i, 1, "red", seed)
1160 stratum(42+i, 1, "orange", seed)
1161 stratum(44+i, 1, "yellow", seed)
1162 stratum(46+i, 1, "brown", seed)
1163 stratum(48+i, 1, "silver", seed)
1164 stratum(51+i, 1, "white", seed)
1165 stratum(55+i, 2, "yellow", seed)
1166 stratum(58+i, 2, "orange", seed)
1167 stratum(62+i, 1, "brown", seed)
1168 stratum(68+i, 3, "orange", seed)
1169 stratum(73+i, 2, "brown", seed)
1170 stratum(76+i, 1, "white", seed)
1171 -- Repeat strata above Y=76
1173 i = i + 66
1174 until i > 256
1177 -- Non-Overworld ores
1178 local function register_dimension_ores()
1180 --[[ NETHER GENERATION ]]
1182 -- Soul sand
1183 minetest.register_ore({
1184 ore_type = "sheet",
1185 ore = "mcl_nether:soul_sand",
1186 -- Note: Stone is included only for v6 mapgen support. Netherrack is not generated naturally
1187 -- in v6, but instead set with the on_generated function in mcl_mapgen_core.
1188 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1189 clust_scarcity = 13 * 13 * 13,
1190 clust_size = 5,
1191 y_min = mcl_vars.mg_nether_min,
1192 y_max = mcl_util.layer_to_y(64, "nether"),
1193 noise_threshold = 0.0,
1194 noise_params = {
1195 offset = 0.5,
1196 scale = 0.1,
1197 spread = {x = 5, y = 5, z = 5},
1198 seed = 2316,
1199 octaves = 1,
1200 persist = 0.0
1204 -- Magma blocks
1205 minetest.register_ore({
1206 ore_type = "blob",
1207 ore = "mcl_nether:magma",
1208 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1209 clust_scarcity = 8*8*8,
1210 clust_num_ores = 45,
1211 clust_size = 6,
1212 y_min = mcl_util.layer_to_y(23, "nether"),
1213 y_max = mcl_util.layer_to_y(37, "nether"),
1215 minetest.register_ore({
1216 ore_type = "blob",
1217 ore = "mcl_nether:magma",
1218 wherein = {"mcl_nether:netherrack"},
1219 clust_scarcity = 10*10*10,
1220 clust_num_ores = 65,
1221 clust_size = 8,
1222 y_min = mcl_util.layer_to_y(23, "nether"),
1223 y_max = mcl_util.layer_to_y(37, "nether"),
1226 -- Glowstone
1227 minetest.register_ore({
1228 ore_type = "blob",
1229 ore = "mcl_nether:glowstone",
1230 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1231 clust_scarcity = 26 * 26 * 26,
1232 clust_size = 5,
1233 y_min = mcl_vars.mg_lava_nether_max + 10,
1234 y_max = mcl_vars.mg_nether_max,
1235 noise_threshold = 0.0,
1236 noise_params = {
1237 offset = 0.5,
1238 scale = 0.1,
1239 spread = {x = 5, y = 5, z = 5},
1240 seed = 17676,
1241 octaves = 1,
1242 persist = 0.0
1246 -- Gravel (Nether)
1247 minetest.register_ore({
1248 ore_type = "sheet",
1249 ore = "mcl_core:gravel",
1250 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1251 column_height_min = 1,
1252 column_height_max = 1,
1253 column_midpoint_factor = 0,
1254 y_min = mcl_util.layer_to_y(63, "nether"),
1255 -- This should be 65, but for some reason with this setting, the sheet ore really stops at 65. o_O
1256 y_max = mcl_util.layer_to_y(65+2, "nether"),
1257 noise_threshold = 0.2,
1258 noise_params = {
1259 offset = 0.0,
1260 scale = 0.5,
1261 spread = {x = 20, y = 20, z = 20},
1262 seed = 766,
1263 octaves = 3,
1264 persist = 0.6,
1268 -- Nether quartz
1269 minetest.register_ore({
1270 ore_type = "scatter",
1271 ore = "mcl_nether:quartz_ore",
1272 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1273 clust_scarcity = 850,
1274 clust_num_ores = 4, -- MC cluster amount: 4-10
1275 clust_size = 3,
1276 y_min = mcl_vars.mg_nether_min,
1277 y_max = mcl_vars.mg_nether_max,
1279 minetest.register_ore({
1280 ore_type = "scatter",
1281 ore = "mcl_nether:quartz_ore",
1282 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1283 clust_scarcity = 1650,
1284 clust_num_ores = 8, -- MC cluster amount: 4-10
1285 clust_size = 4,
1286 y_min = mcl_vars.mg_nether_min,
1287 y_max = mcl_vars.mg_nether_max,
1290 -- Lava springs in the Nether
1291 minetest.register_ore({
1292 ore_type = "scatter",
1293 ore = "mcl_nether:nether_lava_source",
1294 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1295 clust_scarcity = 500,
1296 clust_num_ores = 1,
1297 clust_size = 1,
1298 y_min = mcl_vars.mg_nether_min,
1299 y_max = mcl_vars.mg_lava_nether_max + 1,
1302 minetest.register_ore({
1303 ore_type = "scatter",
1304 ore = "mcl_nether:nether_lava_source",
1305 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1306 clust_scarcity = 1000,
1307 clust_num_ores = 1,
1308 clust_size = 1,
1309 y_min = mcl_vars.mg_lava_nether_max + 2,
1310 y_max = mcl_vars.mg_lava_nether_max + 12,
1313 minetest.register_ore({
1314 ore_type = "scatter",
1315 ore = "mcl_nether:nether_lava_source",
1316 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1317 clust_scarcity = 2000,
1318 clust_num_ores = 1,
1319 clust_size = 1,
1320 y_min = mcl_vars.mg_lava_nether_max + 13,
1321 y_max = mcl_vars.mg_lava_nether_max + 48,
1323 minetest.register_ore({
1324 ore_type = "scatter",
1325 ore = "mcl_nether:nether_lava_source",
1326 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1327 clust_scarcity = 3500,
1328 clust_num_ores = 1,
1329 clust_size = 1,
1330 y_min = mcl_vars.mg_lava_nether_max + 49,
1331 y_max = mcl_vars.mg_nether_max,
1334 --[[ THE END ]]
1336 -- Generate fake End
1337 -- TODO: Remove both "ores" when there's a better End generator
1339 minetest.register_ore({
1340 ore_type = "sheet",
1341 ore = "mcl_end:end_stone",
1342 wherein = {"air"},
1343 y_min = mcl_vars.mg_end_min+64,
1344 y_max = mcl_vars.mg_end_min+80,
1345 column_height_min = 6,
1346 column_height_max = 7,
1347 column_midpoint_factor = 0.0,
1348 noise_params = {
1349 offset = -2,
1350 scale = 8,
1351 spread = {x=100, y=100, z=100},
1352 seed = 2999,
1353 octaves = 5,
1354 persist = 0.55,
1356 noise_threshold = 0,
1359 minetest.register_ore({
1360 ore_type = "sheet",
1361 ore = "mcl_end:end_stone",
1362 wherein = {"air"},
1363 y_min = mcl_vars.mg_end_min+64,
1364 y_max = mcl_vars.mg_end_min+80,
1365 column_height_min = 4,
1366 column_height_max = 4,
1367 column_midpoint_factor = 0.0,
1368 noise_params = {
1369 offset = -4,
1370 scale = 3,
1371 spread = {x=200, y=200, z=200},
1372 seed = 5390,
1373 octaves = 5,
1374 persist = 0.6,
1376 noise_threshold = 0,
1382 -- All mapgens except mgv6
1384 -- Template to register a grass or fern decoration
1385 local function register_grass_decoration(grasstype, offset, scale, biomes)
1386 local place_on, seed, node
1387 if grasstype == "fern" then
1388 node = "mcl_flowers:fern"
1389 place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol"}
1390 seed = 333
1391 elseif grasstype == "tallgrass" then
1392 node = "mcl_flowers:tallgrass"
1393 place_on = {"mcl_core:dirt_with_grass"}
1394 seed = 420
1396 local noise = {
1397 offset = offset,
1398 scale = scale,
1399 spread = {x = 200, y = 200, z = 200},
1400 seed = seed,
1401 octaves = 3,
1402 persist = 0.6
1404 minetest.register_decoration({
1405 deco_type = "simple",
1406 place_on = place_on,
1407 sidelen = 16,
1408 noise_params = noise,
1409 biomes = biomes,
1410 y_min = 1,
1411 y_max = mcl_vars.mg_overworld_max,
1412 decoration = node,
1416 local function register_decorations()
1417 -- Large ice spike
1418 minetest.register_decoration({
1419 deco_type = "schematic",
1420 place_on = {"mcl_core:snowblock", "mcl_core:snow", "mcl_core:dirt_with_grass_snow"},
1421 sidelen = 80,
1422 noise_params = {
1423 offset = 0.00040,
1424 scale = 0.001,
1425 spread = {x = 250, y = 250, z = 250},
1426 seed = 1133,
1427 octaves = 4,
1428 persist = 0.67,
1430 biomes = {"ice_plains_spikes"},
1431 y_min = 4,
1432 y_max = mcl_vars.mg_overworld_max,
1433 schematic = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_large.mts",
1434 rotation = "random",
1435 flags = "place_center_x, place_center_z",
1438 -- Small ice spike
1439 minetest.register_decoration({
1440 deco_type = "schematic",
1441 place_on = {"mcl_core:snowblock", "mcl_core:snow", "mcl_core:dirt_with_grass_snow"},
1442 sidelen = 80,
1443 noise_params = {
1444 offset = 0.005,
1445 scale = 0.001,
1446 spread = {x = 250, y = 250, z = 250},
1447 seed = 1133,
1448 octaves = 4,
1449 persist = 0.67,
1451 biomes = {"ice_plains_spikes"},
1452 y_min = 4,
1453 y_max = mcl_vars.mg_overworld_max,
1454 schematic = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_small.mts",
1455 rotation = "random",
1456 flags = "place_center_x, place_center_z",
1459 -- Oak
1460 -- Large oaks
1461 for i=1, 2 do
1462 minetest.register_decoration({
1463 deco_type = "schematic",
1464 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1465 sidelen = 80,
1466 noise_params = {
1467 offset = 0.00075,
1468 scale = 0.0011,
1469 spread = {x = 250, y = 250, z = 250},
1470 seed = 3,
1471 octaves = 3,
1472 persist = 0.66
1474 biomes = {"forest"},
1475 y_min = 1,
1476 y_max = mcl_vars.mg_overworld_max,
1477 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_large_"..i..".mts",
1478 flags = "place_center_x, place_center_z",
1479 rotation = "random",
1482 minetest.register_decoration({
1483 deco_type = "schematic",
1484 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:dirt_with_grass_snow"},
1485 sidelen = 80,
1486 noise_params = {
1487 offset = -0.0004,
1488 scale = 0.001,
1489 spread = {x = 250, y = 250, z = 250},
1490 seed = 3,
1491 octaves = 3,
1492 persist = 0.6
1494 biomes = {"extreme_hills", "extreme_hills_m", "extreme_hills_plus", "extreme_hills_plus_snowtop"},
1495 y_min = 1,
1496 y_max = mcl_vars.mg_overworld_max,
1497 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_large_"..i..".mts",
1498 flags = "place_center_x, place_center_z",
1499 rotation = "random",
1502 -- Small classic oak (forest, flower forest and ice plains)
1503 minetest.register_decoration({
1504 deco_type = "schematic",
1505 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1506 sidelen = 16,
1507 noise_params = {
1508 offset = 0.025,
1509 scale = 0.0022,
1510 spread = {x = 250, y = 250, z = 250},
1511 seed = 2,
1512 octaves = 3,
1513 persist = 0.66
1515 biomes = {"forest"},
1516 y_min = 1,
1517 y_max = mcl_vars.mg_overworld_max,
1518 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1519 flags = "place_center_x, place_center_z",
1520 rotation = "random",
1522 minetest.register_decoration({
1523 deco_type = "schematic",
1524 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1525 sidelen = 16,
1526 noise_params = {
1527 offset = 0.01,
1528 scale = 0.0022,
1529 spread = {x = 250, y = 250, z = 250},
1530 seed = 2,
1531 octaves = 3,
1532 persist = 0.66
1534 biomes = {"flower_forest"},
1535 y_min = 1,
1536 y_max = mcl_vars.mg_overworld_max,
1537 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1538 flags = "place_center_x, place_center_z",
1539 rotation = "random",
1541 minetest.register_decoration({
1542 deco_type = "schematic",
1543 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:dirt_with_grass_snow"},
1544 sidelen = 16,
1545 noise_params = {
1546 offset = 0.0,
1547 scale = 0.002,
1548 spread = {x = 250, y = 250, z = 250},
1549 seed = 2,
1550 octaves = 3,
1551 persist = 0.7
1553 biomes = {"extreme_hills", "extreme_hills_m", "extreme_hills_plus", "extreme_hills_plus_snowtop"},
1554 y_min = 1,
1555 y_max = mcl_vars.mg_overworld_max,
1556 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1557 flags = "place_center_x, place_center_z",
1558 rotation = "random",
1561 minetest.register_decoration({
1562 deco_type = "schematic",
1563 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow", "mcl_core:dirt"},
1564 sidelen = 16,
1565 noise_params = {
1566 offset = 0.006,
1567 scale = 0.002,
1568 spread = {x = 250, y = 250, z = 250},
1569 seed = 2,
1570 octaves = 3,
1571 persist = 0.7
1573 biomes = {"extreme_hills_plus", "extreme_hills_plus_snowtop"},
1574 y_min = 50,
1575 y_max = mcl_vars.mg_overworld_max,
1576 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1577 flags = "place_center_x, place_center_z",
1578 rotation = "random",
1580 minetest.register_decoration({
1581 deco_type = "schematic",
1582 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1583 sidelen = 16,
1584 noise_params = {
1585 offset = 0.015,
1586 scale = 0.002,
1587 spread = {x = 250, y = 250, z = 250},
1588 seed = 2,
1589 octaves = 3,
1590 persist = 0.7
1592 biomes = {"mesa_plateau_f_grasstop"},
1593 y_min = 30,
1594 y_max = mcl_vars.mg_overworld_max,
1595 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1596 flags = "place_center_x, place_center_z",
1597 rotation = "random",
1600 minetest.register_decoration({
1601 deco_type = "schematic",
1602 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:dirt_with_grass_snow"},
1603 sidelen = 16,
1604 noise_params = {
1605 offset = 0.0,
1606 scale = 0.0002,
1607 spread = {x = 250, y = 250, z = 250},
1608 seed = 2,
1609 octaves = 3,
1610 persist = 0.7
1612 biomes = {"ice_plains"},
1613 y_min = 1,
1614 y_max = mcl_vars.mg_overworld_max,
1615 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1616 flags = "place_center_x, place_center_z",
1617 rotation = "random",
1619 -- Rare balloon oak
1620 minetest.register_decoration({
1621 deco_type = "schematic",
1622 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1623 sidelen = 16,
1624 noise_params = {
1625 offset = 0.002083,
1626 scale = 0.0022,
1627 spread = {x = 250, y = 250, z = 250},
1628 seed = 3,
1629 octaves = 3,
1630 persist = 0.6,
1632 biomes = {"forest"},
1633 y_min = 1,
1634 y_max = mcl_vars.mg_overworld_max,
1635 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_balloon.mts",
1636 flags = "place_center_x, place_center_z",
1637 rotation = "random",
1639 -- Swamp oak
1640 minetest.register_decoration({
1641 deco_type = "schematic",
1642 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1643 sidelen = 80,
1644 noise_params = {
1645 offset = 0.0055,
1646 scale = 0.0011,
1647 spread = {x = 250, y = 250, z = 250},
1648 seed = 5005,
1649 octaves = 5,
1650 persist = 0.6,
1652 biomes = {"swampland", "swampland_shore"},
1653 y_min = 0,
1654 y_max = mcl_vars.mg_overworld_max,
1655 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_swamp.mts",
1656 flags = "place_center_x, place_center_z",
1657 rotation = "random",
1660 -- Jungle tree
1661 minetest.register_decoration({
1662 deco_type = "schematic",
1663 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1664 sidelen = 80,
1665 fill_ratio = 0.0025,
1666 biomes = {"jungle"},
1667 y_min = 4,
1668 y_max = mcl_vars.mg_overworld_max,
1669 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree_huge.mts",
1670 flags = "place_center_x, place_center_z",
1671 rotation = "random",
1673 minetest.register_decoration({
1674 deco_type = "schematic",
1675 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1676 sidelen = 80,
1677 fill_ratio = 0.045,
1678 biomes = {"jungle"},
1679 y_min = 1,
1680 y_max = mcl_vars.mg_overworld_max,
1681 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree.mts",
1682 flags = "place_center_x, place_center_z",
1683 rotation = "random",
1685 minetest.register_decoration({
1686 deco_type = "schematic",
1687 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1688 sidelen = 80,
1689 fill_ratio = 0.0045,
1690 biomes = {"jungle_edge"},
1691 y_min = 1,
1692 y_max = mcl_vars.mg_overworld_max,
1693 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree.mts",
1694 flags = "place_center_x, place_center_z",
1695 rotation = "random",
1698 -- Oak in jungle / jungle edge
1699 minetest.register_decoration({
1700 deco_type = "schematic",
1701 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1702 sidelen = 80,
1703 fill_ratio = 0.004,
1704 biomes = {"jungle"},
1705 y_min = 1,
1706 y_max = mcl_vars.mg_overworld_max,
1707 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1708 flags = "place_center_x, place_center_z",
1709 rotation = "random",
1711 minetest.register_decoration({
1712 deco_type = "schematic",
1713 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1714 sidelen = 80,
1715 fill_ratio = 0.0004,
1716 biomes = {"jungle_edge"},
1717 y_min = 1,
1718 y_max = mcl_vars.mg_overworld_max,
1719 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1720 flags = "place_center_x, place_center_z",
1721 rotation = "random",
1724 -- Spruce
1725 local function quick_spruce(seed, offset, sprucename, biomes, y)
1726 if not y then
1727 y = 2
1729 minetest.register_decoration({
1730 deco_type = "schematic",
1731 place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol"},
1732 sidelen = 16,
1733 noise_params = {
1734 offset = offset,
1735 scale = 0.0006,
1736 spread = {x = 250, y = 250, z = 250},
1737 seed = seed,
1738 octaves = 3,
1739 persist = 0.66
1741 biomes = biomes,
1742 y_min = y,
1743 y_max = mcl_vars.mg_overworld_max,
1744 schematic = minetest.get_modpath("mcl_core").."/schematics/"..sprucename,
1745 flags = "place_center_x, place_center_z",
1749 -- Huge spruce
1750 quick_spruce(3000, 0.0013, "mcl_core_spruce_huge_1.mts", {"mega_spruce_taiga"})
1751 quick_spruce(4000, 0.00142, "mcl_core_spruce_huge_2.mts", {"mega_spruce_taiga"})
1752 quick_spruce(6000, 0.0013, "mcl_core_spruce_huge_3.mts", {"mega_spruce_taiga"})
1754 quick_spruce(3000, 0.0008, "mcl_core_spruce_huge_up_1.mts", {"mega_taiga"})
1755 quick_spruce(4000, 0.0008, "mcl_core_spruce_huge_up_2.mts", {"mega_taiga"})
1756 quick_spruce(6000, 0.0008, "mcl_core_spruce_huge_up_3.mts", {"mega_taiga"})
1759 -- Common spruce
1760 quick_spruce(11000, 0.00150, "mcl_core_spruce_5.mts", {"taiga", "cold_taiga"})
1762 quick_spruce(2500, 0.00325, "mcl_core_spruce_1.mts", {"mega_spruce_taiga", "mega_taiga", "taiga", "cold_taiga"})
1763 quick_spruce(7000, 0.00425, "mcl_core_spruce_3.mts", {"mega_spruce_taiga", "mega_taiga", "taiga", "cold_taiga"})
1764 quick_spruce(9000, 0.00325, "mcl_core_spruce_4.mts", {"mega_spruce_taiga", "mega_taiga", "taiga", "cold_taiga"})
1766 quick_spruce(9500, 0.00500, "mcl_core_spruce_tall.mts", {"mega_taiga"})
1768 quick_spruce(5000, 0.00250, "mcl_core_spruce_2.mts", {"mega_spruce_taiga", "mega_taiga"})
1770 quick_spruce(11000, 0.000025, "mcl_core_spruce_5.mts", {"extreme_hills", "extreme_hills_m"})
1771 quick_spruce(2500, 0.00005, "mcl_core_spruce_1.mts", {"extreme_hills", "extreme_hills_m"})
1772 quick_spruce(7000, 0.00005, "mcl_core_spruce_3.mts", {"extreme_hills", "extreme_hills_m"})
1773 quick_spruce(9000, 0.00005, "mcl_core_spruce_4.mts", {"extreme_hills", "extreme_hills_m"})
1775 quick_spruce(11000, 0.001, "mcl_core_spruce_5.mts", {"extreme_hills_plus", "extreme_hills_plus_snowtop"}, 50)
1776 quick_spruce(2500, 0.002, "mcl_core_spruce_1.mts", {"extreme_hills_plus", "extreme_hills_plus_snowtop"}, 50)
1777 quick_spruce(7000, 0.003, "mcl_core_spruce_3.mts", {"extreme_hills_plus", "extreme_hills_plus_snowtop"}, 50)
1778 quick_spruce(9000, 0.002, "mcl_core_spruce_4.mts", {"extreme_hills_plus", "extreme_hills_plus_snowtop"}, 50)
1781 -- Small lollipop spruce
1782 minetest.register_decoration({
1783 deco_type = "schematic",
1784 place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"},
1785 sidelen = 16,
1786 noise_params = {
1787 offset = 0.004,
1788 scale = 0.0022,
1789 spread = {x = 250, y = 250, z = 250},
1790 seed = 2500,
1791 octaves = 3,
1792 persist = 0.66
1794 biomes = {"taiga", "cold_taiga"},
1795 y_min = 2,
1796 y_max = mcl_vars.mg_overworld_max,
1797 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_spruce_lollipop.mts",
1798 flags = "place_center_x, place_center_z",
1801 -- Matchstick spruce: Very few leaves, tall trunk
1802 minetest.register_decoration({
1803 deco_type = "schematic",
1804 place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"},
1805 sidelen = 80,
1806 noise_params = {
1807 offset = -0.025,
1808 scale = 0.025,
1809 spread = {x = 250, y = 250, z = 250},
1810 seed = 2566,
1811 octaves = 5,
1812 persist = 0.60,
1814 biomes = {"taiga", "cold_taiga"},
1815 y_min = 3,
1816 y_max = mcl_vars.mg_overworld_max,
1817 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_spruce_matchstick.mts",
1818 flags = "place_center_x, place_center_z",
1821 -- Acacia (many variants)
1822 for a=1, 7 do
1823 minetest.register_decoration({
1824 deco_type = "schematic",
1825 place_on = {"mcl_core:dirt_with_grass", "mcl_core:coarse_dirt"},
1826 sidelen = 16,
1827 fill_ratio = 0.0002,
1828 biomes = {"savanna"},
1829 y_min = 1,
1830 y_max = mcl_vars.mg_overworld_max,
1831 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_acacia_"..a..".mts",
1832 flags = "place_center_x, place_center_z",
1833 rotation = "random",
1837 -- Birch
1838 minetest.register_decoration({
1839 deco_type = "schematic",
1840 place_on = {"mcl_core:dirt_with_grass"},
1841 sidelen = 16,
1842 noise_params = {
1843 offset = 0.03,
1844 scale = 0.0025,
1845 spread = {x = 250, y = 250, z = 250},
1846 seed = 11,
1847 octaves = 3,
1848 persist = 0.66
1850 biomes = {"birch_forest"},
1851 y_min = 1,
1852 y_max = mcl_vars.mg_overworld_max,
1853 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_birch.mts",
1854 flags = "place_center_x, place_center_z",
1856 minetest.register_decoration({
1857 deco_type = "schematic",
1858 place_on = {"mcl_core:dirt_with_grass"},
1859 sidelen = 16,
1860 noise_params = {
1861 offset = 0.03,
1862 scale = 0.0025,
1863 spread = {x = 250, y = 250, z = 250},
1864 seed = 11,
1865 octaves = 3,
1866 persist = 0.66
1868 biomes = {"birch_forest_m"},
1869 y_min = 1,
1870 y_max = mcl_vars.mg_overworld_max,
1871 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_birch_tall.mts",
1872 flags = "place_center_x, place_center_z",
1875 minetest.register_decoration({
1876 deco_type = "schematic",
1877 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1878 sidelen = 16,
1879 noise_params = {
1880 offset = 0.000333,
1881 scale = -0.0015,
1882 spread = {x = 250, y = 250, z = 250},
1883 seed = 11,
1884 octaves = 3,
1885 persist = 0.66
1887 biomes = {"forest", "flower_forest"},
1888 y_min = 1,
1889 y_max = mcl_vars.mg_overworld_max,
1890 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_birch.mts",
1891 flags = "place_center_x, place_center_z",
1893 minetest.register_decoration({
1894 deco_type = "schematic",
1895 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
1896 sidelen = 16,
1897 noise_params = {
1898 offset = -0.00075,
1899 scale = -0.0015,
1900 spread = {x = 250, y = 250, z = 250},
1901 seed = 11,
1902 octaves = 3,
1903 persist = 0.7
1905 biomes = {"ice_plains"},
1906 y_min = 1,
1907 y_max = mcl_vars.mg_overworld_max,
1908 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_birch.mts",
1909 flags = "place_center_x, place_center_z",
1912 -- Dark Oak
1913 minetest.register_decoration({
1914 deco_type = "schematic",
1915 place_on = {"mcl_core:dirt_with_grass"},
1916 sidelen = 16,
1917 noise_params = {
1918 offset = 0.05,
1919 scale = 0.0015,
1920 spread = {x = 125, y = 125, z = 125},
1921 seed = 223,
1922 octaves = 3,
1923 persist = 0.66
1925 biomes = {"roofed_forest"},
1926 y_min = 4,
1927 y_max = mcl_vars.mg_overworld_max,
1928 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_dark_oak.mts",
1929 flags = "place_center_x, place_center_z",
1930 rotation = "random",
1934 local ratio_mushroom = 0.0001
1935 local ratio_mushroom_huge = ratio_mushroom * (11/12)
1936 local ratio_mushroom_giant = ratio_mushroom * (1/12)
1937 local ratio_mushroom_mycelium = 0.002
1938 local ratio_mushroom_mycelium_huge = ratio_mushroom_mycelium * (11/12)
1939 local ratio_mushroom_mycelium_giant = ratio_mushroom_mycelium * (1/12)
1941 -- Huge Brown Mushroom
1942 minetest.register_decoration({
1943 deco_type = "schematic",
1944 place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
1945 sidelen = 80,
1946 fill_ratio = ratio_mushroom_huge,
1947 biomes = { "roofed_forest" },
1948 y_min = 1,
1949 y_max = mcl_vars.mg_overworld_max,
1950 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts",
1951 flags = "place_center_x, place_center_z",
1952 rotation = "random",
1954 minetest.register_decoration({
1955 deco_type = "schematic",
1956 place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
1957 sidelen = 80,
1958 fill_ratio = ratio_mushroom_giant,
1959 biomes = { "roofed_forest" },
1960 y_min = 1,
1961 y_max = mcl_vars.mg_overworld_max,
1962 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_brown.mts",
1963 flags = "place_center_x, place_center_z",
1964 rotation = "random",
1967 minetest.register_decoration({
1968 deco_type = "schematic",
1969 place_on = { "mcl_core:mycelium" },
1970 sidelen = 80,
1971 fill_ratio = ratio_mushroom_mycelium_huge,
1972 biomes = { "mushroom_island", "mushroom_island_shore" },
1973 y_min = 1,
1974 y_max = mcl_vars.mg_overworld_max,
1975 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts",
1976 flags = "place_center_x, place_center_z",
1977 rotation = "random",
1979 minetest.register_decoration({
1980 deco_type = "schematic",
1981 place_on = { "mcl_core:mycelium" },
1982 sidelen = 80,
1983 fill_ratio = ratio_mushroom_mycelium_giant,
1984 biomes = { "mushroom_island", "mushroom_island_shore" },
1985 y_min = 1,
1986 y_max = mcl_vars.mg_overworld_max,
1987 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_brown.mts",
1988 flags = "place_center_x, place_center_z",
1989 rotation = "random",
1992 -- Huge Red Mushroom
1993 minetest.register_decoration({
1994 deco_type = "schematic",
1995 place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
1996 sidelen = 80,
1997 fill_ratio = ratio_mushroom_huge,
1998 biomes = { "roofed_forest" },
1999 y_min = 1,
2000 y_max = mcl_vars.mg_overworld_max,
2001 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts",
2002 flags = "place_center_x, place_center_z",
2003 rotation = "random",
2005 minetest.register_decoration({
2006 deco_type = "schematic",
2007 place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
2008 sidelen = 80,
2009 fill_ratio = ratio_mushroom_giant,
2010 biomes = { "roofed_forest" },
2011 y_min = 1,
2012 y_max = mcl_vars.mg_overworld_max,
2013 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_red.mts",
2014 flags = "place_center_x, place_center_z",
2015 rotation = "random",
2018 minetest.register_decoration({
2019 deco_type = "schematic",
2020 place_on = { "mcl_core:mycelium" },
2021 sidelen = 80,
2022 fill_ratio = ratio_mushroom_mycelium_huge,
2023 biomes = { "mushroom_island", "mushroom_island_shore" },
2024 y_min = 1,
2025 y_max = mcl_vars.mg_overworld_max,
2026 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts",
2027 flags = "place_center_x, place_center_z",
2028 rotation = "random",
2030 minetest.register_decoration({
2031 deco_type = "schematic",
2032 place_on = { "mcl_core:mycelium" },
2033 sidelen = 80,
2034 fill_ratio = ratio_mushroom_mycelium_giant,
2035 biomes = { "mushroom_island", "mushroom_island_shore" },
2036 y_min = 1,
2037 y_max = mcl_vars.mg_overworld_max,
2038 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_red.mts",
2039 flags = "place_center_x, place_center_z",
2040 rotation = "random",
2043 -- Moss stone boulder (3×3)
2044 minetest.register_decoration({
2045 deco_type = "schematic",
2046 place_on = {"mcl_core:podzol", "mcl_core:dirt", "mcl_core:coarse_dirt"},
2047 sidelen = 80,
2048 noise_params = {
2049 offset = 0.00015,
2050 scale = 0.001,
2051 spread = {x = 300, y = 300, z = 300},
2052 seed = 775703,
2053 octaves = 4,
2054 persist = 0.63,
2056 biomes = {"mega_taiga", "mega_spruce_taiga"},
2057 y_min = 1,
2058 y_max = mcl_vars.mg_overworld_max,
2059 schematic = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_boulder.mts",
2060 flags = "place_center_x, place_center_z",
2063 -- Small moss stone boulder (2×2)
2064 minetest.register_decoration({
2065 deco_type = "schematic",
2066 place_on = {"mcl_core:podzol", "mcl_core:dirt", "mcl_core:coarse_dirt"},
2067 sidelen = 80,
2068 noise_params = {
2069 offset = 0.001,
2070 scale = 0.001,
2071 spread = {x = 300, y = 300, z = 300},
2072 seed = 775703,
2073 octaves = 4,
2074 persist = 0.63,
2076 biomes = {"mega_taiga", "mega_spruce_taiga"},
2077 y_min = 1,
2078 y_max = mcl_vars.mg_overworld_max,
2079 schematic = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_boulder_small.mts",
2080 flags = "place_center_x, place_center_z",
2083 -- Cacti
2084 minetest.register_decoration({
2085 deco_type = "simple",
2086 place_on = {"group:sand"},
2087 sidelen = 16,
2088 noise_params = {
2089 offset = -0.012,
2090 scale = 0.024,
2091 spread = {x = 100, y = 100, z = 100},
2092 seed = 257,
2093 octaves = 3,
2094 persist = 0.6
2096 y_min = 4,
2097 y_max = mcl_vars.mg_overworld_max,
2098 decoration = "mcl_core:cactus",
2099 biomes = {"red_desert","desert","mesa","mesa_sandlevel","mesa_plateau_f","mesa_plateau_f_sandlevel"},
2100 height = 1,
2101 height_max = 3,
2104 -- Sugar canes
2105 minetest.register_decoration({
2106 deco_type = "simple",
2107 place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_core:dirt_with_grass", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
2108 sidelen = 16,
2109 noise_params = {
2110 offset = -0.3,
2111 scale = 0.7,
2112 spread = {x = 100, y = 100, z = 100},
2113 seed = 2,
2114 octaves = 3,
2115 persist = 0.7
2117 biomes = {"plains", "plains_beach", "taiga_beach", "ice_plains", "cold_taiga_beach", "savanna_beach", "forest_beach", "red_desert", "desert"},
2118 y_min = 1,
2119 y_max = mcl_vars.mg_overworld_max,
2120 decoration = "mcl_core:reeds",
2121 height = 1,
2122 height_max = 3,
2123 spawn_by = { "mcl_core:water_source", "group:frosted_ice" },
2124 num_spawn_by = 1,
2126 minetest.register_decoration({
2127 deco_type = "simple",
2128 place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_core:dirt_with_grass", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
2129 sidelen = 16,
2130 noise_params = {
2131 offset = 0.0,
2132 scale = 0.5,
2133 spread = {x = 100, y = 100, z = 100},
2134 seed = 2,
2135 octaves = 3,
2136 persist = 0.7,
2138 biomes = {"swampland"},
2139 y_min = 1,
2140 y_max = mcl_vars.mg_overworld_max,
2141 decoration = "mcl_core:reeds",
2142 height = 1,
2143 height_max = 3,
2144 spawn_by = { "mcl_core:water_source", "group:frosted_ice" },
2145 num_spawn_by = 1,
2148 -- Doubletall grass
2149 minetest.register_decoration({
2150 deco_type = "schematic",
2151 schematic = {
2152 size = { x=1, y=3, z=1 },
2153 data = {
2154 { name = "air", prob = 0 },
2155 { name = "mcl_flowers:double_grass", param1=255, },
2156 { name = "mcl_flowers:double_grass_top", param1=255, },
2159 replacements = {
2160 ["mcl_flowers:tallgrass"] = "mcl_flowers:double_grass"
2162 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
2163 sidelen = 16,
2164 noise_params = {
2165 offset = -0.01,
2166 scale = 0.03,
2167 spread = {x = 300, y = 300, z = 300},
2168 seed = 420,
2169 octaves = 2,
2170 persist = 0.6,
2172 y_min = 1,
2173 y_max = mcl_vars.mg_overworld_max,
2174 biomes = {"plains", "sunflower_plains", "taiga", "forest", "flower_forest", "birch_forest", "birch_forest_m", "roofed_forest", "savanna", "mesa_plateau_f_grasstop" },
2177 -- Large ferns
2178 minetest.register_decoration({
2179 deco_type = "schematic",
2180 schematic = {
2181 size = { x=1, y=3, z=1 },
2182 data = {
2183 { name = "air", prob = 0 },
2184 { name = "mcl_flowers:double_fern", param1=255, },
2185 { name = "mcl_flowers:double_fern_top", param1=255, },
2188 replacements = {
2189 ["mcl_flowers:fern"] = "mcl_flowers:double_fern"
2191 place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:podzol_snow"},
2193 sidelen = 16,
2194 noise_params = {
2195 offset = 0.01,
2196 scale = 0.01,
2197 spread = {x = 250, y = 250, z = 250},
2198 seed = 333,
2199 octaves = 2,
2200 persist = 0.66,
2202 biomes = { "jungle", "jungle_edge", "taiga", "cold_taiga", "mega_taiga", "mega_spruce_taiga" },
2203 y_min = 1,
2204 y_max = mcl_vars.mg_overworld_max,
2207 -- Large flowers
2208 local register_large_flower = function(name, biomes, seed, offset, flower_forest_offset)
2209 local maxi
2210 if flower_forest_offset then
2211 maxi = 2
2212 else
2213 maxi = 1
2215 for i=1, maxi do
2216 local o, b -- offset, biomes
2217 if i == 1 then
2218 o = offset
2219 b = biomes
2220 else
2221 o = flower_forest_offset
2222 b = { "flower_forest" }
2225 minetest.register_decoration({
2226 deco_type = "schematic",
2227 schematic = {
2228 size = { x=1, y=3, z=1 },
2229 data = {
2230 { name = "air", prob = 0 },
2231 { name = "mcl_flowers:"..name, param1=255, },
2232 { name = "mcl_flowers:"..name.."_top", param1=255, },
2235 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2237 sidelen = 16,
2238 noise_params = {
2239 offset = o,
2240 scale = 0.01,
2241 spread = {x = 300, y = 300, z = 300},
2242 seed = seed,
2243 octaves = 5,
2244 persist = 0.62,
2246 y_min = 1,
2247 y_max = mcl_vars.mg_overworld_max,
2248 flags = "",
2249 biomes = b,
2254 register_large_flower("rose_bush", {"forest"}, 9350, -0.008, 0.003)
2255 register_large_flower("peony", {"forest"}, 10450, -0.008, 0.003)
2256 register_large_flower("lilac", {"forest"}, 10600, -0.007, 0.003)
2257 -- TODO
2258 register_large_flower("sunflower", {"plains", "sunflower_plains"}, 2940, 0.0)
2260 -- Jungle bush
2261 minetest.register_decoration({
2262 deco_type = "schematic",
2263 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2264 sidelen = 80,
2265 noise_params = {
2266 offset = 0.0196,
2267 scale = 0.025,
2268 spread = {x = 250, y = 250, z = 250},
2269 seed = 2930,
2270 octaves = 4,
2271 persist = 0.6,
2273 biomes = {"jungle"},
2274 y_min = 3,
2275 y_max = mcl_vars.mg_overworld_max,
2276 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_bush.mts",
2277 flags = "place_center_x, place_center_z",
2279 minetest.register_decoration({
2280 deco_type = "schematic",
2281 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2282 sidelen = 80,
2283 noise_params = {
2284 offset = 0.0085,
2285 scale = 0.025,
2286 spread = {x = 250, y = 250, z = 250},
2287 seed = 2930,
2288 octaves = 4,
2289 persist = 0.6,
2291 biomes = {"jungle_edge"},
2292 y_min = 3,
2293 y_max = mcl_vars.mg_overworld_max,
2294 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_bush.mts",
2295 flags = "place_center_x, place_center_z",
2298 -- Fallen logs
2299 minetest.register_decoration({
2300 deco_type = "schematic",
2301 place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:coarse_dirt"},
2302 sidelen = 80,
2303 noise_params = {
2304 offset = 0.00018,
2305 scale = 0.00011,
2306 spread = {x = 250, y = 250, z = 250},
2307 seed = 2,
2308 octaves = 3,
2309 persist = 0.66
2311 biomes = {"mega_taiga", "mega_spruce_taiga", "taiga"},
2312 y_min = 1,
2313 y_max = mcl_vars.mg_overworld_max,
2314 schematic = {
2315 size = {x = 4, y = 3, z = 1},
2316 data = {
2317 {name = "air", prob = 0},
2318 {name = "air", prob = 0},
2319 {name = "air", prob = 0},
2320 {name = "air", prob = 0},
2321 {name = "mcl_core:sprucetree", param2 = 12, prob = 127},
2322 {name = "mcl_core:sprucetree", param2 = 12},
2323 {name = "mcl_core:sprucetree", param2 = 12},
2324 {name = "mcl_core:sprucetree", param2 = 12, prob = 127},
2325 {name = "air", prob = 0},
2326 {name = "mcl_mushrooms:mushroom_brown", prob = 160},
2327 {name = "mcl_mushrooms:mushroom_red", prob = 160},
2328 {name = "air", prob = 0},
2331 flags = "place_center_x",
2332 rotation = "random",
2335 minetest.register_decoration({
2336 deco_type = "schematic",
2337 place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:podzol_snow", "mcl_core:coarse_dirt"},
2338 sidelen = 80,
2339 noise_params = {
2340 offset = 0.00018,
2341 scale = 0.00011,
2342 spread = {x = 250, y = 250, z = 250},
2343 seed = 2,
2344 octaves = 3,
2345 persist = 0.66
2347 biomes = {"cold_taiga"},
2348 y_min = 1,
2349 y_max = mcl_vars.mg_overworld_max,
2350 schematic = {
2351 size = {x = 4, y = 3, z = 1},
2352 data = {
2353 {name = "air", prob = 0},
2354 {name = "air", prob = 0},
2355 {name = "air", prob = 0},
2356 {name = "air", prob = 0},
2357 {name = "mcl_core:sprucetree", param2 = 12, prob = 127},
2358 {name = "mcl_core:sprucetree", param2 = 12},
2359 {name = "mcl_core:sprucetree", param2 = 12},
2360 {name = "mcl_core:sprucetree", param2 = 12, prob = 127},
2361 {name = "air", prob = 0},
2362 {name = "air", prob = 0},
2363 {name = "air", prob = 0},
2364 {name = "air", prob = 0},
2367 flags = "place_center_x",
2368 rotation = "random",
2371 minetest.register_decoration({
2372 deco_type = "schematic",
2373 place_on = {"mcl_core:dirt_with_grass"},
2374 sidelen = 16,
2375 noise_params = {
2376 offset = 0.0,
2377 scale = -0.00008,
2378 spread = {x = 250, y = 250, z = 250},
2379 seed = 2,
2380 octaves = 3,
2381 persist = 0.66
2383 biomes = {"forest", "birch_forest", "birch_forest_m",},
2384 y_min = 1,
2385 y_max = mcl_vars.mg_overworld_max,
2386 schematic = {
2387 size = {x = 3, y = 3, z = 1},
2388 data = {
2389 {name = "air", prob = 0},
2390 {name = "air", prob = 0},
2391 {name = "air", prob = 0},
2392 {name = "mcl_core:birchtree", param2 = 12},
2393 {name = "mcl_core:birchtree", param2 = 12},
2394 {name = "mcl_core:birchtree", param2 = 12, prob = 127},
2395 {name = "mcl_mushrooms:mushroom_red", prob = 100},
2396 {name = "mcl_mushrooms:mushroom_brown", prob = 10},
2397 {name = "air", prob = 0},
2400 flags = "place_center_x",
2401 rotation = "random",
2404 minetest.register_decoration({
2405 deco_type = "schematic",
2406 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2407 sidelen = 80,
2408 fill_ratio = 0.005,
2409 biomes = {"jungle"},
2410 y_min = 1,
2411 y_max = mcl_vars.mg_overworld_max,
2412 schematic = {
2413 size = {x = 4, y = 3, z = 1},
2414 data = {
2415 {name = "air", prob = 0},
2416 {name = "air", prob = 0},
2417 {name = "air", prob = 0},
2418 {name = "air", prob = 0},
2419 {name = "mcl_core:jungletree", param2 = 12, prob = 127},
2420 {name = "mcl_core:jungletree", param2 = 12},
2421 {name = "mcl_core:jungletree", param2 = 12},
2422 {name = "mcl_core:jungletree", param2 = 12, prob = 127},
2423 {name = "air", prob = 0},
2424 {name = "mcl_mushrooms:mushroom_brown", prob = 50},
2425 {name = "air", prob = 0},
2426 {name = "air", prob = 0},
2429 flags = "place_center_x",
2430 rotation = "random",
2433 minetest.register_decoration({
2434 deco_type = "schematic",
2435 place_on = {"mcl_core:dirt_with_grass"},
2436 sidelen = 16,
2437 noise_params = {
2438 offset = 0.00018,
2439 scale = 0.00011,
2440 spread = {x = 250, y = 250, z = 250},
2441 seed = 2,
2442 octaves = 3,
2443 persist = 0.66
2445 biomes = {"forest"},
2446 y_min = 1,
2447 y_max = mcl_vars.mg_overworld_max,
2448 schematic = {
2449 size = {x = 3, y = 3, z = 1},
2450 data = {
2451 {name = "air", prob = 0},
2452 {name = "air", prob = 0},
2453 {name = "air", prob = 0},
2454 {name = "mcl_core:tree", param2 = 12, prob = 127},
2455 {name = "mcl_core:tree", param2 = 12},
2456 {name = "mcl_core:tree", param2 = 12},
2457 {name = "air", prob = 0},
2458 {name = "mcl_mushrooms:mushroom_brown", prob = 96},
2459 {name = "mcl_mushrooms:mushroom_red", prob = 96},
2462 flags = "place_center_x",
2463 rotation = "random",
2466 -- Lily pad
2468 local lily_schem = {
2469 { name = "mcl_core:water_source" },
2470 { name = "mcl_flowers:waterlily" },
2473 -- Spawn them in shallow water at ocean level in swamplands.
2474 -- Tweak lilydepth to change the maximum water depth
2475 local lilydepth = 2
2477 for d=1, lilydepth do
2478 local height = d + 2
2479 local y = 1 - d
2480 table.insert(lily_schem, 1, { name = "air", prob = 0 })
2482 minetest.register_decoration({
2483 deco_type = "schematic",
2484 schematic = {
2485 size = { x=1, y=height, z=1 },
2486 data = lily_schem,
2488 place_on = "mcl_core:dirt",
2489 sidelen = 16,
2490 noise_params = {
2491 offset = 0,
2492 scale = 0.3,
2493 spread = {x = 100, y = 100, z = 100},
2494 seed = 503,
2495 octaves = 6,
2496 persist = 0.7,
2498 y_min = y,
2499 y_max = y,
2500 biomes = { "swampland_shore" },
2501 rotation = "random",
2505 -- Melon
2506 minetest.register_decoration({
2507 deco_type = "simple",
2508 place_on = {"mcl_core:dirt_with_grass"},
2509 sidelen = 16,
2510 noise_params = {
2511 offset = -0.01,
2512 scale = 0.006,
2513 spread = {x = 250, y = 250, z = 250},
2514 seed = 333,
2515 octaves = 3,
2516 persist = 0.6
2518 y_min = 1,
2519 y_max = mcl_vars.mg_overworld_max,
2520 decoration = "mcl_farming:melon",
2521 biomes = { "jungle" },
2523 minetest.register_decoration({
2524 deco_type = "simple",
2525 place_on = {"mcl_core:dirt_with_grass"},
2526 sidelen = 16,
2527 noise_params = {
2528 offset = -0.005,
2529 scale = 0.006,
2530 spread = {x = 250, y = 250, z = 250},
2531 seed = 333,
2532 octaves = 3,
2533 persist = 0.6
2535 y_min = 1,
2536 y_max = mcl_vars.mg_overworld_max,
2537 decoration = "mcl_farming:melon",
2538 biomes = { "jungle_edge" },
2541 -- Pumpkin
2542 minetest.register_decoration({
2543 deco_type = "schematic",
2544 schematic = {
2545 size = { x=1, y=2, z=1 },
2546 data = {
2547 { name = "air", prob = 0 },
2548 { name = "mcl_farming:pumpkin_face", param1=255, },
2551 place_on = {"mcl_core:dirt_with_grass"},
2552 sidelen = 16,
2553 noise_params = {
2554 offset = -0.016,
2555 scale = 0.01332,
2556 spread = {x = 125, y = 125, z = 125},
2557 seed = 666,
2558 octaves = 6,
2559 persist = 0.666
2561 biomes = {"plains"},
2562 y_min = 3,
2563 y_max = 29,
2564 rotation = "random",
2567 -- Grasses and ferns
2568 local grass_forest = {"plains", "taiga", "forest", "flower_forest", "birch_forest", "birch_forest_m", "roofed_forest", "swampland", "mesa_plateau_f_grasstop" }
2569 local grass_plains = {"plains", "savanna", "sunflower_plains", "jungle_edge" }
2570 local grass_savanna = {"savanna"}
2571 local grass_sparse = {"extreme_hills", "extreme_hills_plus", "extreme_hills_plus_snowtop", "extreme_hills_m" }
2573 register_grass_decoration("tallgrass", -0.03, 0.09, grass_forest)
2574 register_grass_decoration("tallgrass", -0.015, 0.075, grass_forest)
2575 register_grass_decoration("tallgrass", 0, 0.06, grass_forest)
2576 register_grass_decoration("tallgrass", 0.015, 0.045, grass_forest)
2577 register_grass_decoration("tallgrass", 0.03, 0.03, grass_forest)
2578 register_grass_decoration("tallgrass", 0.01, 0.05, grass_forest)
2579 register_grass_decoration("tallgrass", 0.03, 0.03, grass_plains)
2580 register_grass_decoration("tallgrass", 0.05, 0.01, grass_plains)
2581 register_grass_decoration("tallgrass", 0.07, -0.01, grass_plains)
2582 register_grass_decoration("tallgrass", 0.09, -0.03, grass_plains)
2583 register_grass_decoration("tallgrass", 0.18, -0.03, grass_savanna)
2584 register_grass_decoration("tallgrass", 0.05, -0.03, grass_sparse)
2586 local fern_minimal = { "jungle", "jungle_edge", "taiga", "mega_taiga", "mega_spruce_taiga", "cold_taiga" }
2587 local fern_low = { "jungle", "jungle_edge", "taiga", "mega_taiga", "mega_spruce_taiga" }
2588 local fern_jungle = { "jungle", "jungle_edge" }
2589 register_grass_decoration("fern", -0.03, 0.09, fern_minimal)
2590 register_grass_decoration("fern", -0.015, 0.075, fern_minimal)
2591 register_grass_decoration("fern", 0, 0.06, fern_minimal)
2592 register_grass_decoration("fern", 0.015, 0.045, fern_low)
2593 register_grass_decoration("fern", 0.03, 0.03, fern_low)
2594 register_grass_decoration("fern", 0.01, 0.05, fern_jungle)
2595 register_grass_decoration("fern", 0.03, 0.03, fern_jungle)
2596 register_grass_decoration("fern", 0.05, 0.01, fern_jungle)
2597 register_grass_decoration("fern", 0.07, -0.01, fern_jungle)
2598 register_grass_decoration("fern", 0.09, -0.03, fern_jungle)
2600 -- Place tall grass on snow in Ice Plains and Extreme Hills+
2601 minetest.register_decoration({
2602 deco_type = "schematic",
2603 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
2604 sidelen = 16,
2605 noise_params = {
2606 offset = -0.08,
2607 scale = 0.09,
2608 spread = {x = 15, y = 15, z = 15},
2609 seed = 420,
2610 octaves = 3,
2611 persist = 0.6,
2613 biomes = {"ice_plains"},
2614 y_min = 1,
2615 y_max = mcl_vars.mg_overworld_max,
2616 schematic = {
2617 size = { x=1, y=2, z=1 },
2618 data = {
2619 { name = "mcl_core:dirt_with_grass", force_place=true, },
2620 { name = "mcl_flowers:tallgrass", },
2624 minetest.register_decoration({
2625 deco_type = "schematic",
2626 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
2627 sidelen = 16,
2628 noise_params = {
2629 offset = 0.0,
2630 scale = 0.09,
2631 spread = {x = 15, y = 15, z = 15},
2632 seed = 420,
2633 octaves = 3,
2634 persist = 0.6,
2636 biomes = {"extreme_hills_plus_snowtop"},
2637 y_min = 1,
2638 y_max = mcl_vars.mg_overworld_max,
2639 schematic = {
2640 size = { x=1, y=2, z=1 },
2641 data = {
2642 { name = "mcl_core:dirt_with_grass", force_place=true, },
2643 { name = "mcl_flowers:tallgrass", },
2649 -- Dead bushes
2650 minetest.register_decoration({
2651 deco_type = "simple",
2652 place_on = {"group:sand", "mcl_core:podzol", "mcl_core:podzol_snow", "mcl_core:dirt", "mcl_core:coarse_dirt", "group:hardened_clay"},
2653 sidelen = 16,
2654 noise_params = {
2655 offset = 0,
2656 scale = 0.035,
2657 spread = {x = 100, y = 100, z = 100},
2658 seed = 1972,
2659 octaves = 3,
2660 persist = 0.6
2662 y_min = 4,
2663 y_max = mcl_vars.mg_overworld_max,
2664 biomes = {"red_desert", "desert", "mesa", "mesa_sandlevel", "mesa_plateau_f", "mesa_plateau_f_sandlevel", "taiga", "mega_taiga"},
2665 decoration = "mcl_core:deadbush",
2666 height = 1,
2669 -- Mushrooms in mushroom biome
2670 minetest.register_decoration({
2671 deco_type = "simple",
2672 place_on = {"mcl_core:mycelium"},
2673 sidelen = 80,
2674 fill_ratio = 0.009,
2675 biomes = {"mushroom_island", "mushroom_island_shore"},
2676 noise_threshold = 2.0,
2677 y_min = mcl_vars.mg_overworld_min,
2678 y_max = mcl_vars.mg_overworld_max,
2679 decoration = "mcl_mushrooms:mushroom_red",
2681 minetest.register_decoration({
2682 deco_type = "simple",
2683 place_on = {"mcl_core:mycelium"},
2684 sidelen = 80,
2685 fill_ratio = 0.009,
2686 biomes = {"mushroom_island", "mushroom_island_shore"},
2687 y_min = mcl_vars.mg_overworld_min,
2688 y_max = mcl_vars.mg_overworld_max,
2689 decoration = "mcl_mushrooms:mushroom_brown",
2692 -- Mushrooms in taigas
2693 minetest.register_decoration({
2694 deco_type = "simple",
2695 place_on = {"mcl_core:podzol"},
2696 sidelen = 80,
2697 fill_ratio = 0.003,
2698 biomes = {"taiga", "mega_taiga", "mega_spruce_taiga"},
2699 y_min = mcl_vars.mg_overworld_min,
2700 y_max = mcl_vars.mg_overworld_max,
2701 decoration = "mcl_mushrooms:mushroom_red",
2703 minetest.register_decoration({
2704 deco_type = "simple",
2705 place_on = {"mcl_core:podzol"},
2706 sidelen = 80,
2707 fill_ratio = 0.003,
2708 biomes = {"taiga", "mega_taiga", "mega_spruce_taiga"},
2709 y_min = mcl_vars.mg_overworld_min,
2710 y_max = mcl_vars.mg_overworld_max,
2711 decoration = "mcl_mushrooms:mushroom_brown",
2715 -- Mushrooms next to trees
2716 local mushrooms = {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}
2717 local mseeds = { 7133, 8244 }
2718 for m=1, #mushrooms do
2719 -- Mushrooms next to trees
2720 minetest.register_decoration({
2721 deco_type = "simple",
2722 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
2723 sidelen = 16,
2724 noise_params = {
2725 offset = 0,
2726 scale = 0.003,
2727 spread = {x = 250, y = 250, z = 250},
2728 seed = mseeds[m],
2729 octaves = 3,
2730 persist = 0.66,
2732 y_min = 1,
2733 y_max = mcl_vars.mg_overworld_max,
2734 decoration = mushrooms[m],
2735 spawn_by = { "mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree" },
2736 num_spawn_by = 1,
2739 -- More mushrooms in swamplands
2740 minetest.register_decoration({
2741 deco_type = "simple",
2742 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
2743 sidelen = 16,
2744 noise_params = {
2745 offset = 0.05,
2746 scale = 0.003,
2747 spread = {x = 250, y = 250, z = 250},
2748 seed = mseeds[m],
2749 octaves = 3,
2750 persist = 0.6,
2752 y_min = 1,
2753 y_max = mcl_vars.mg_overworld_max,
2754 decoration = mushrooms[m],
2755 biomes = { "swampland "},
2756 spawn_by = { "mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree" },
2757 num_spawn_by = 1,
2760 local function register_flower(name, biomes, seed, is_in_flower_forest)
2761 if is_in_flower_forest == nil then
2762 is_in_flower_forest = true
2764 if biomes then
2765 minetest.register_decoration({
2766 deco_type = "simple",
2767 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2768 sidelen = 16,
2769 noise_params = {
2770 offset = 0.0008,
2771 scale = 0.006,
2772 spread = {x = 100, y = 100, z = 100},
2773 seed = seed,
2774 octaves = 3,
2775 persist = 0.6
2777 y_min = 1,
2778 y_max = mcl_vars.mg_overworld_max,
2779 biomes = biomes,
2780 decoration = "mcl_flowers:"..name,
2783 if is_in_flower_forest then
2784 minetest.register_decoration({
2785 deco_type = "simple",
2786 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2787 sidelen = 80,
2788 noise_params= {
2789 offset = 0.0008*40,
2790 scale = 0.003,
2791 spread = {x = 100, y = 100, z = 100},
2792 seed = seed,
2793 octaves = 3,
2794 persist = 0.6,
2796 y_min = 1,
2797 y_max = mcl_vars.mg_overworld_max,
2798 biomes = {"flower_forest"},
2799 decoration = "mcl_flowers:"..name,
2804 local flower_biomes1 = {"plains", "sunflower_plains", "roofed_forest", "forest", "birch_forest", "birch_forest_m", "taiga", "cold_taiga", "jungle", "jungle_edge", "savanna", "extreme_hills", "extreme_hills_m", "extreme_hills_plus", "extreme_hills_plus_snowtop", "mesa_plateau_f_grasstop" }
2806 register_flower("dandelion", flower_biomes1, 8)
2807 register_flower("poppy", flower_biomes1, 9439)
2809 local flower_biomes2 = {"plains", "sunflower_plains"}
2810 register_flower("tulip_red", flower_biomes2, 436)
2811 register_flower("tulip_orange", flower_biomes2, 536)
2812 register_flower("tulip_pink", flower_biomes2, 636)
2813 register_flower("tulip_white", flower_biomes2, 736)
2814 register_flower("azure_bluet", flower_biomes2, 800)
2815 register_flower("oxeye_daisy", flower_biomes2, 3490)
2817 register_flower("allium", nil, 0) -- flower forest only
2818 register_flower("blue_orchid", {"swampland"}, 64500, false)
2822 -- Decorations in non-Overworld dimensions
2823 local function register_dimension_decorations()
2824 -- TODO
2828 -- Detect mapgen to select functions
2830 if mg_name ~= "singlenode" then
2831 minetest.clear_registered_biomes()
2832 minetest.clear_registered_decorations()
2833 minetest.clear_registered_schematics()
2834 if mg_name ~= "v6" and mg_name ~= "flat" then
2835 register_biomes()
2836 register_biomelike_ores()
2837 register_decorations()
2838 elseif mg_name == "flat" then
2839 -- Implementation of Minecraft's Superflat mapgen, classic style
2840 minetest.clear_registered_biomes()
2841 minetest.clear_registered_decorations()
2842 minetest.clear_registered_schematics()
2843 register_classic_superflat_biome()
2846 -- Non-overworld stuff is registered independently
2847 register_dimension_biomes()
2848 register_dimension_ores()
2849 register_dimension_decorations()
2851 -- Overworld decorations for v6 are handled in mcl_mapgen_core