Add jungle edge biome
[MineClone/MineClone2.git] / mods / MAPGEN / mcl_biomes / init.lua
blobb098953488a9d48705f6f5ab266c006c3fab1a0f
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()
26 --[[ OVERWORLD ]]
27 -- Ice spikes
28 minetest.register_biome({
29 name = "ice_plains_spike",
30 node_top = "mcl_core:snowblock",
31 depth_top = 2,
32 node_filler = "mcl_core:snowblock",
33 depth_filler = 1,
34 node_water_top = "mcl_core:ice",
35 depth_water_top = 2,
36 node_river_water = "mcl_core:ice",
37 node_riverbed = "mcl_core:sand",
38 depth_riverbed = 2,
39 y_min = 1,
40 y_max = mcl_vars.mg_overworld_max,
41 heat_point = 0,
42 humidity_point = 73,
45 -- Frozen ocean
46 minetest.register_biome({
47 name = "ice_plains_spike_ocean",
48 node_top = "mcl_core:gravel",
49 depth_top = 2,
50 node_filler = "mcl_core:dirt",
51 depth_filler = 3,
52 node_water_top = "mcl_core:ice",
53 depth_water_top = 2,
54 node_river_water = "mcl_core:ice",
55 node_riverbed = "mcl_core:sand",
56 depth_riverbed = 2,
57 y_min = mcl_vars.mg_overworld_min,
58 y_max = 0,
59 heat_point = 0,
60 humidity_point = 73,
63 -- Cold Taiga
64 minetest.register_biome({
65 name = "cold_taiga",
66 node_dust = "mcl_core:snow",
67 node_top = "mcl_core:dirt_with_grass_snow",
68 depth_top = 1,
69 node_filler = "mcl_core:dirt",
70 depth_filler = 2,
71 node_riverbed = "mcl_core:sand",
72 depth_riverbed = 2,
73 y_min = 2,
74 y_max = mcl_vars.mg_overworld_max,
75 heat_point = 0,
76 humidity_point = 40,
79 minetest.register_biome({
80 name = "cold_taiga_beach",
81 node_dust = "mcl_core:snow",
82 node_top = "mcl_core:sand",
83 depth_top = 1,
84 node_water_top = "mcl_core:ice",
85 depth_water_top = 1,
86 node_filler = "mcl_core:sand",
87 depth_filler = 2,
88 node_riverbed = "mcl_core:sand",
89 depth_riverbed = 2,
90 y_min = -3,
91 y_max = 1,
92 heat_point = 0,
93 humidity_point = 40,
96 minetest.register_biome({
97 name = "cold_taiga_ocean",
98 node_top = "mcl_core:dirt",
99 depth_top = 1,
100 node_filler = "mcl_core:dirt",
101 depth_filler = 3,
102 node_riverbed = "mcl_core:sand",
103 depth_riverbed = 2,
104 y_min = mcl_vars.mg_overworld_min,
105 y_max = -4,
106 heat_point = 0,
107 humidity_point = 40,
110 -- Mega taiga
111 minetest.register_biome({
112 name = "mega_taiga",
113 node_top = "mcl_core:podzol",
114 depth_top = 1,
115 node_filler = "mcl_core:dirt",
116 depth_filler = 3,
117 node_riverbed = "mcl_core:sand",
118 depth_riverbed = 2,
119 y_min = 1,
120 y_max = mcl_vars.mg_overworld_max,
121 heat_point = 26,
122 humidity_point = 72,
125 minetest.register_biome({
126 name = "mega_taiga_ocean",
127 node_top = "mcl_core:dirt",
128 depth_top = 1,
129 node_filler = "mcl_core:dirt",
130 depth_filler = 3,
131 node_riverbed = "mcl_core:sand",
132 depth_riverbed = 2,
133 y_min = mcl_vars.mg_overworld_min,
134 y_max = 0,
135 heat_point = 26,
136 humidity_point = 72,
139 -- Mega spruce taiga
140 minetest.register_biome({
141 name = "mega_spruce_taiga",
142 node_top = "mcl_core:podzol",
143 depth_top = 1,
144 node_filler = "mcl_core:dirt",
145 depth_filler = 3,
146 node_riverbed = "mcl_core:sand",
147 depth_riverbed = 2,
148 y_min = 1,
149 y_max = mcl_vars.mg_overworld_max,
150 heat_point = 21,
151 humidity_point = 72,
154 minetest.register_biome({
155 name = "mega_spruce_taiga_ocean",
156 node_top = "mcl_core:dirt",
157 depth_top = 1,
158 node_filler = "mcl_core:dirt",
159 depth_filler = 3,
160 node_riverbed = "mcl_core:sand",
161 depth_riverbed = 2,
162 y_min = mcl_vars.mg_overworld_min,
163 y_max = 0,
164 heat_point = 21,
165 humidity_point = 72,
168 -- Ice plains
169 minetest.register_biome({
170 name = "ice_plains",
171 node_dust = "mcl_core:snow",
172 node_top = "mcl_core:dirt_with_grass_snow",
173 depth_top = 1,
174 node_filler = "mcl_core:dirt",
175 depth_filler = 2,
176 node_water_top = "mcl_core:ice",
177 depth_water_top = 2,
178 node_river_water = "mcl_core:ice",
179 node_riverbed = "mcl_core:sand",
180 depth_riverbed = 2,
181 y_min = 1,
182 y_max = mcl_vars.mg_overworld_max,
183 heat_point = 13,
184 humidity_point = 79,
187 minetest.register_biome({
188 name = "ice_plains_ocean",
189 node_top = "mcl_core:dirt",
190 depth_top = 1,
191 node_filler = "mcl_core:dirt",
192 depth_filler = 3,
193 node_riverbed = "mcl_core:sand",
194 depth_riverbed = 2,
195 y_min = mcl_vars.mg_overworld_min,
196 y_max = 0,
197 heat_point = 13,
198 humidity_point = 79,
201 -- Plains
202 minetest.register_biome({
203 name = "plains",
204 node_top = "mcl_core:dirt_with_grass",
205 depth_top = 1,
206 node_filler = "mcl_core:dirt",
207 depth_filler = 2,
208 node_riverbed = "mcl_core:sand",
209 depth_riverbed = 2,
210 y_min = 4,
211 y_max = mcl_vars.mg_overworld_max,
212 heat_point = 26,
213 humidity_point = 45,
216 minetest.register_biome({
217 name = "plains_beach",
218 node_top = "mcl_core:sand",
219 depth_top = 1,
220 node_filler = "mcl_core:sand",
221 depth_filler = 2,
222 node_riverbed = "mcl_core:sand",
223 depth_riverbed = 2,
224 y_min = 3,
225 y_max = 1,
226 heat_point = 26,
227 humidity_point = 45,
230 minetest.register_biome({
231 name = "plains_ocean",
232 node_top = "mcl_core:dirt",
233 depth_top = 1,
234 node_filler = "mcl_core:dirt",
235 depth_filler = 3,
236 node_riverbed = "mcl_core:sand",
237 depth_riverbed = 2,
238 y_min = mcl_vars.mg_overworld_min,
239 y_max = 0,
240 heat_point = 26,
241 humidity_point = 45,
244 -- TODO: Sunflower Plains
245 --[[
246 minetest.register_biome({
247 name = "sunflower_plains",
248 node_top = "mcl_core:dirt_with_grass",
249 depth_top = 1,
250 node_filler = "mcl_core:dirt",
251 depth_filler = 2,
252 node_riverbed = "mcl_core:sand",
253 depth_riverbed = 2,
254 y_min = 4,
255 y_max = mcl_vars.mg_overworld_max,
256 heat_point = 26,
257 humidity_point = 22.5,
260 minetest.register_biome({
261 name = "sunflower_plains_ocean",
262 node_top = "mcl_core:dirt",
263 depth_top = 1,
264 node_filler = "mcl_core:dirt",
265 depth_filler = 3,
266 node_riverbed = "mcl_core:dirt",
267 depth_riverbed = 2,
268 y_min = mcl_vars.mg_overworld_min,
269 y_max = 0,
270 heat_point = 26,
271 humidity_point = 22.5,
275 -- Taiga
276 minetest.register_biome({
277 name = "taiga",
278 node_top = "mcl_core:dirt_with_grass",
279 depth_top = 1,
280 node_filler = "mcl_core:dirt",
281 depth_filler = 3,
282 node_riverbed = "mcl_core:sand",
283 depth_riverbed = 2,
284 y_min = 4,
285 y_max = mcl_vars.mg_overworld_max,
286 heat_point = 47,
287 humidity_point = 73, --was 70
290 minetest.register_biome({
291 name = "taiga_beach",
292 node_top = "mcl_core:sand",
293 depth_top = 1,
294 node_filler = "mcl_core:dirt",
295 depth_filler = 3,
296 node_riverbed = "mcl_core:sand",
297 depth_riverbed = 2,
298 y_min = 1,
299 y_max = 3,
300 heat_point = 47,
301 humidity_point = 73, --was 70
304 minetest.register_biome({
305 name = "taiga_ocean",
306 node_top = "mcl_core:sand",
307 depth_top = 1,
308 node_filler = "mcl_core:dirt",
309 depth_filler = 3,
310 node_riverbed = "mcl_core:sand",
311 depth_riverbed = 2,
312 y_min = mcl_vars.mg_overworld_min,
313 y_max = 0,
314 heat_point = 47,
315 humidity_point = 73, --was 70
318 -- (Deciduous) forest
319 minetest.register_biome({
320 name = "forest",
321 node_top = "mcl_core:dirt_with_grass",
322 depth_top = 1,
323 node_filler = "mcl_core:dirt",
324 depth_filler = 3,
325 node_riverbed = "mcl_core:sand",
326 depth_riverbed = 2,
327 y_min = 1,
328 y_max = mcl_vars.mg_overworld_max,
329 heat_point = 33,
330 humidity_point = 44, --was 68
333 minetest.register_biome({
334 name = "forest_beach",
335 node_top = "mcl_core:sand",
336 depth_top = 1,
337 node_filler = "mcl_core:dirt",
338 depth_filler = 3,
339 node_riverbed = "mcl_core:sand",
340 depth_riverbed = 2,
341 y_min = -1,
342 y_max = 0,
343 heat_point = 33,
344 humidity_point = 44, --was 68
347 minetest.register_biome({
348 name = "forest_ocean",
349 node_top = "mcl_core:dirt",
350 depth_top = 1,
351 node_filler = "mcl_core:dirt",
352 depth_filler = 3,
353 node_riverbed = "mcl_core:sand",
354 depth_riverbed = 2,
355 y_min = mcl_vars.mg_overworld_min,
356 y_max = -2,
357 heat_point = 33,
358 humidity_point = 44, --was 68
361 -- Flower forest
362 minetest.register_biome({
363 name = "flower_forest",
364 node_top = "mcl_core:dirt_with_grass",
365 depth_top = 1,
366 node_filler = "mcl_core:dirt",
367 depth_filler = 3,
368 node_riverbed = "mcl_core:sand",
369 depth_riverbed = 2,
370 y_min = 2,
371 y_max = mcl_vars.mg_overworld_max,
372 heat_point = 33,
373 humidity_point = 51,
376 minetest.register_biome({
377 name = "flower_forest_beach",
378 node_top = "mcl_core:sand",
379 depth_top = 1,
380 node_filler = "mcl_core:dirt",
381 depth_filler = 3,
382 node_riverbed = "mcl_core:sand",
383 depth_riverbed = 2,
384 y_min = -2,
385 y_max = 1,
386 heat_point = 33,
387 humidity_point = 51,
390 minetest.register_biome({
391 name = "flower_forest_ocean",
392 node_top = "mcl_core:dirt",
393 depth_top = 1,
394 node_filler = "mcl_core:dirt",
395 depth_filler = 3,
396 node_riverbed = "mcl_core:sand",
397 depth_riverbed = 2,
398 y_min = mcl_vars.mg_overworld_min,
399 y_max = -3,
400 heat_point = 33,
401 humidity_point = 51,
404 -- Birch forest
405 minetest.register_biome({
406 name = "birch_forest",
407 node_top = "mcl_core:dirt_with_grass",
408 depth_top = 1,
409 node_filler = "mcl_core:dirt",
410 depth_filler = 3,
411 node_riverbed = "mcl_core:sand",
412 depth_riverbed = 2,
413 y_min = 1,
414 y_max = mcl_vars.mg_overworld_max,
415 heat_point = 20,
416 humidity_point = 49,
419 minetest.register_biome({
420 name = "birch_forest_ocean",
421 node_top = "mcl_core:dirt",
422 depth_top = 1,
423 node_filler = "mcl_core:dirt",
424 depth_filler = 3,
425 node_riverbed = "mcl_core:sand",
426 depth_riverbed = 2,
427 y_min = mcl_vars.mg_overworld_min,
428 y_max = 0,
429 heat_point = 20,
430 humidity_point = 49,
433 -- Birch forest M
434 minetest.register_biome({
435 name = "birch_forest_m",
436 node_top = "mcl_core:dirt_with_grass",
437 depth_top = 1,
438 node_filler = "mcl_core:dirt",
439 depth_filler = 3,
440 node_riverbed = "mcl_core:sand",
441 depth_riverbed = 2,
442 y_min = 1,
443 y_max = mcl_vars.mg_overworld_max,
444 heat_point = 20,
445 humidity_point = 44,
448 minetest.register_biome({
449 name = "birch_forest_m_ocean",
450 node_top = "mcl_core:dirt",
451 depth_top = 1,
452 node_filler = "mcl_core:dirt",
453 depth_filler = 3,
454 node_riverbed = "mcl_core:sand",
455 depth_riverbed = 2,
456 y_min = mcl_vars.mg_overworld_min,
457 y_max = 0,
458 heat_point = 20,
459 humidity_point = 44,
462 -- Desert (Red Sand)
463 minetest.register_biome({
464 name = "red_desert",
465 node_top = "mcl_core:redsand",
466 depth_top = 1,
467 node_filler = "mcl_core:redsand",
468 depth_filler = 2,
469 node_riverbed = "mcl_core:sand",
470 depth_riverbed = 2,
471 node_stone = "mcl_core:redsandstone",
472 y_min = 1,
473 y_max = mcl_vars.mg_overworld_max,
474 heat_point = 64,
475 humidity_point = 37, --was 16
478 minetest.register_biome({
479 name = "red_desert_ocean",
480 node_top = "mcl_core:redsand",
481 depth_top = 1,
482 node_filler = "mcl_core:redsand",
483 depth_filler = 3,
484 node_riverbed = "mcl_core:redsand",
485 depth_riverbed = 2,
486 y_min = mcl_vars.mg_overworld_min,
487 y_max = 0,
488 heat_point = 64,
489 humidity_point = 37, --was 16
492 -- Desert (Sand)
493 minetest.register_biome({
494 name = "desert",
495 node_top = "mcl_core:sand",
496 depth_top = 1,
497 node_filler = "mcl_core:sand",
498 depth_filler = 2,
499 node_riverbed = "mcl_core:sand",
500 depth_riverbed = 2,
501 node_stone = "mcl_core:sandstone",
502 y_min = 1,
503 y_max = mcl_vars.mg_overworld_max,
504 heat_point = 57,
505 humidity_point = 0, --was 0
508 minetest.register_biome({
509 name = "desert_ocean",
510 node_top = "mcl_core:sand",
511 depth_top = 1,
512 node_filler = "mcl_core:sand",
513 depth_filler = 3,
514 node_riverbed = "mcl_core:sand",
515 depth_riverbed = 2,
516 y_min = mcl_vars.mg_overworld_min,
517 y_max = 0,
518 heat_point = 57,
519 humidity_point = 0, --was 0
522 -- Roofed forest
523 minetest.register_biome({
524 name = "roofed_forest",
525 node_top = "mcl_core:dirt_with_grass",
526 depth_top = 1,
527 node_filler = "mcl_core:dirt",
528 depth_filler = 2,
529 node_riverbed = "mcl_core:sand",
530 depth_riverbed = 2,
531 y_min = 1,
532 y_max = mcl_vars.mg_overworld_max,
533 heat_point = 26,
534 humidity_point = 0,
537 minetest.register_biome({
538 name = "roofed_forest_ocean",
539 node_top = "mcl_core:dirt",
540 depth_top = 1,
541 node_filler = "mcl_core:dirt",
542 depth_filler = 1,
543 node_riverbed = "mcl_core:sand",
544 depth_riverbed = 2,
545 y_min = mcl_vars.mg_overworld_min,
546 y_max = 0,
547 heat_point = 26,
548 humidity_point = 0,
551 -- Mesa
552 minetest.register_biome({
553 name = "mesa",
554 node_top = "mcl_colorblocks:hardened_clay",
555 depth_top = 1,
556 node_filler = "mcl_colorblocks:hardened_clay",
557 depth_filler = 35,
558 node_riverbed = "mcl_core:redsand",
559 depth_riverbed = 2,
560 node_stone = "mcl_colorblocks:hardened_clay",
561 y_min = 1,
562 y_max = mcl_vars.mg_overworld_max,
563 heat_point = 88,
564 humidity_point = 20,
567 minetest.register_biome({
568 name = "mesa_ocean",
569 node_top = "mcl_core:redsand",
570 depth_top = 3,
571 node_filler = "mcl_colorblocks:hardened_clay",
572 depth_filler = 1,
573 node_riverbed = "mcl_core:redsand",
574 depth_riverbed = 2,
575 y_min = mcl_vars.mg_overworld_min,
576 y_max = 0,
577 heat_point = 88,
578 humidity_point = 20,
581 -- Savanna
582 minetest.register_biome({
583 name = "savanna",
584 node_top = "mcl_core:dirt_with_grass",
585 depth_top = 1,
586 node_filler = "mcl_core:coarse_dirt",
587 depth_filler = 2,
588 node_riverbed = "mcl_core:sand",
589 depth_riverbed = 2,
590 y_min = 1,
591 y_max = mcl_vars.mg_overworld_max,
592 heat_point = 50,
593 humidity_point = 46,
596 minetest.register_biome({
597 name = "savanna_beach",
598 node_top = "mcl_core:sand",
599 depth_top = 1,
600 node_filler = "mcl_core:dirt",
601 depth_filler = 3,
602 node_riverbed = "mcl_core:sand",
603 depth_riverbed = 2,
604 y_min = -1,
605 y_max = 0,
606 heat_point = 50,
607 humidity_point = 46,
610 minetest.register_biome({
611 name = "savanna_ocean",
612 node_top = "mcl_core:dirt",
613 depth_top = 1,
614 node_filler = "mcl_core:coarse_dirt",
615 depth_filler = 3,
616 node_riverbed = "mcl_core:sand",
617 depth_riverbed = 2,
618 y_min = mcl_vars.mg_overworld_min,
619 y_max = -2,
620 heat_point = 50,
621 humidity_point = 46,
624 -- Jungle
625 minetest.register_biome({
626 name = "jungle",
627 node_top = "mcl_core:dirt_with_grass",
628 depth_top = 1,
629 node_filler = "mcl_core:dirt",
630 depth_filler = 3,
631 node_riverbed = "mcl_core:sand",
632 depth_riverbed = 2,
633 y_min = 1,
634 y_max = mcl_vars.mg_overworld_max,
635 heat_point = 90,
636 humidity_point = 91,
639 minetest.register_biome({
640 name = "jungle_shore",
641 node_top = "mcl_core:dirt",
642 depth_top = 1,
643 node_filler = "mcl_core:dirt",
644 depth_filler = 3,
645 node_riverbed = "mcl_core:sand",
646 depth_riverbed = 2,
647 y_min = -1,
648 y_max = 0,
649 heat_point = 90,
650 humidity_point = 91,
653 minetest.register_biome({
654 name = "jungle_ocean",
655 node_top = "mcl_core:dirt",
656 depth_top = 1,
657 node_filler = "mcl_core:dirt",
658 depth_filler = 3,
659 node_riverbed = "mcl_core:sand",
660 depth_riverbed = 2,
661 y_min = mcl_vars.mg_overworld_min,
662 y_max = -2,
663 heat_point = 90,
664 humidity_point = 91,
667 -- Jungle edge
668 minetest.register_biome({
669 name = "jungle_edge",
670 node_top = "mcl_core:dirt_with_grass",
671 depth_top = 1,
672 node_filler = "mcl_core:dirt",
673 depth_filler = 3,
674 node_riverbed = "mcl_core:sand",
675 depth_riverbed = 2,
676 y_min = 1,
677 y_max = mcl_vars.mg_overworld_max,
678 heat_point = 90,
679 humidity_point = 87,
682 minetest.register_biome({
683 name = "jungle_edge_shore",
684 node_top = "mcl_core:dirt",
685 depth_top = 1,
686 node_filler = "mcl_core:dirt",
687 depth_filler = 3,
688 node_riverbed = "mcl_core:sand",
689 depth_riverbed = 2,
690 y_min = -1,
691 y_max = 0,
692 heat_point = 90,
693 humidity_point = 87,
696 minetest.register_biome({
697 name = "jungle_edge_ocean",
698 node_top = "mcl_core:dirt",
699 depth_top = 1,
700 node_filler = "mcl_core:dirt",
701 depth_filler = 3,
702 node_riverbed = "mcl_core:sand",
703 depth_riverbed = 2,
704 y_min = mcl_vars.mg_overworld_min,
705 y_max = -2,
706 heat_point = 90,
707 humidity_point = 87,
710 -- Swampland
711 minetest.register_biome({
712 name = "swampland",
713 node_top = "mcl_core:dirt_with_grass",
714 depth_top = 1,
715 node_filler = "mcl_core:dirt",
716 depth_filler = 3,
717 node_riverbed = "mcl_core:sand",
718 depth_riverbed = 2,
719 y_min = 1,
720 y_max = 23,
721 heat_point = 60,
722 humidity_point = 99,
725 minetest.register_biome({
726 name = "swampland_shore",
727 node_top = "mcl_core:dirt",
728 depth_top = 1,
729 node_filler = "mcl_core:dirt",
730 depth_filler = 3,
731 node_riverbed = "mcl_core:sand",
732 depth_riverbed = 2,
733 y_min = -4,
734 y_max = 0,
735 heat_point = 60,
736 humidity_point = 99,
739 minetest.register_biome({
740 name = "swampland_ocean",
741 node_top = "mcl_core:sand",
742 depth_top = 1,
743 node_filler = "mcl_core:sand",
744 depth_filler = 3,
745 node_riverbed = "mcl_core:sand",
746 depth_riverbed = 2,
747 y_min = 20,
748 y_max = -4,
749 heat_point = 60,
750 humidity_point = 99,
753 -- Mushroom biomes
754 -- TODO: Make sure these biomes only spawn in islands
755 minetest.register_biome({
756 name = "mushroom_island",
757 node_top = "mcl_core:mycelium",
758 depth_top = 1,
759 node_filler = "mcl_core:dirt",
760 depth_filler = 3,
761 node_riverbed = "mcl_core:sand",
762 depth_riverbed = 2,
763 y_min = 4,
764 y_max = 20,
765 heat_point = 99,
766 humidity_point = 99,
769 minetest.register_biome({
770 name = "mushroom_island_shore",
771 node_top = "mcl_core:mycelium",
772 depth_top = 1,
773 node_filler = "mcl_core:dirt",
774 depth_filler = 3,
775 node_riverbed = "mcl_core:sand",
776 depth_riverbed = 2,
777 y_min = 1,
778 y_max = 3,
779 heat_point = 99,
780 humidity_point = 99,
783 minetest.register_biome({
784 name = "mushroom_island_ocean",
785 node_top = "mcl_core:dirt",
786 depth_top = 1,
787 node_filler = "mcl_core:dirt",
788 depth_filler = 3,
789 node_riverbed = "mcl_core:sand",
790 depth_riverbed = 2,
791 y_min = mcl_vars.mg_overworld_min,
792 y_max = 0,
793 heat_point = 99,
794 humidity_point = 99,
800 -- Register biomes of non-Overworld biomes
801 local function register_dimension_biomes()
802 --[[ REALMS ]]
804 --[[ THE NETHER ]]
805 minetest.register_biome({
806 name = "nether",
807 node_filler = "mcl_nether:netherrack",
808 node_stone = "mcl_nether:netherrack",
809 node_water = "air",
810 node_river_water = "air",
811 y_min = mcl_vars.mg_nether_min,
812 -- FIXME: For some reason the Nether stops generating early if this constant is not added.
813 -- Figure out why.
814 y_max = mcl_vars.mg_nether_max + 80,
815 heat_point = 100,
816 humidity_point = 0,
819 --[[ THE END ]]
820 minetest.register_biome({
821 name = "end",
822 node_stone = "air",
823 node_filler = "air",
824 node_water = "air",
825 node_river_water = "air",
826 -- FIXME: For some reason the End stops generating early if this constant is not added.
827 -- Figure out why.
828 y_min = mcl_vars.mg_end_min,
829 y_max = mcl_vars.mg_end_max + 80,
830 heat_point = 50,
831 humidity_point = 50,
836 -- Register “fake” ores directly related to the biomes
837 local function register_biomelike_ores()
839 -- Mesa ores
840 minetest.register_ore({
841 ore_type = "sheet",
842 ore = "mcl_core:sandstone",
843 wherein ={"mcl_colorblocks:hardened_clay"},
844 clust_scarcity = 1,
845 clust_num_ores = 12,
846 clust_size = 10,
847 y_min = 10,
848 y_max = 30,
849 noise_threshold = 0.2,
850 noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=24, octaves=3, persist=0.70},
851 biomes = { "mesa" },
854 minetest.register_ore({
855 ore_type = "sheet",
856 ore = "mcl_core:dirt",
857 wherein = {"mcl_colorblocks:hardened_clay"},
858 clust_scarcity = 1,
859 clust_num_ores = 12,
860 clust_size = 4,
861 y_min = -12,
862 y_max = 7,
863 noise_threshold = 0.4,
864 noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=24, octaves=3, persist=0.70},
865 biomes = { "mesa" },
868 minetest.register_ore({
869 ore_type = "sheet",
870 ore = "mcl_core:redsand",
871 wherein = { "mcl_colorblocks:hardened_clay"},
872 clust_scarcity = 1,
873 clust_num_ores = 12,
874 clust_size = 10,
875 y_min = 44,
876 y_max = 70,
877 noise_threshold = 0.7,
878 noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=24, octaves=3, persist=0.70},
879 biomes = { "mesa" },
882 minetest.register_ore({
883 ore_type = "sheet",
884 ore = "mcl_core:redsand",
885 wherein = {"mcl_core:redsandstone", "mcl_colorblocks:hardened_clay"},
886 clust_scarcity = 1,
887 clust_num_ores = 8,
888 clust_size = 4,
889 y_min = 4,
890 y_max = 70,
891 noise_threshold = 0.4,
892 noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=24, octaves=3, persist=0.70},
893 biomes = { "mesa" },
896 -- Mesa strata
897 minetest.register_ore({
898 ore_type = "sheet",
899 ore = "mcl_colorblocks:hardened_clay_silver",
900 wherein = {"mcl_colorblocks:hardened_clay"},
901 clust_size = 1,
902 y_min = 5,
903 y_max = 14,
904 noise_threshold = 0.0,
905 noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70} ,
906 biomes = { "mesa" },
909 minetest.register_ore({
910 ore_type = "sheet",
911 ore = "mcl_colorblocks:hardened_clay_brown",
912 wherein = {"mcl_colorblocks:hardened_clay"},
913 clust_size = 1,
914 y_min = 15,
915 y_max = 17,
916 noise_threshold = 0.0,
917 noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70},
918 biomes = { "mesa" },
921 minetest.register_ore({
922 ore_type = "sheet",
923 ore = "mcl_colorblocks:hardened_clay_orange",
924 wherein = {"mcl_colorblocks:hardened_clay"},
925 clust_size = 6,
926 y_min = 20,
927 y_max = 29,
928 noise_threshold = 0.0,
929 noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70} ,
930 biomes = { "mesa" },
933 minetest.register_ore({
934 ore_type = "sheet",
935 ore = "mcl_colorblocks:hardened_clay_red",
936 wherein = {"mcl_colorblocks:hardened_clay"},
937 clust_size = 2,
938 y_min = 34,
939 y_max = 37,
940 noise_threshold = 0.0,
941 noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70} ,
942 biomes = { "mesa" },
945 minetest.register_ore({
946 ore_type = "sheet",
947 ore = "mcl_colorblocks:hardened_clay_yellow",
948 wherein = {"mcl_colorblocks:hardened_clay"},
949 clust_size = 1,
950 y_min = 42,
951 y_max = 43,
952 noise_threshold = 0.0,
953 noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70} ,
954 biomes = { "mesa" },
956 minetest.register_ore({
957 ore_type = "sheet",
958 ore = "mcl_colorblocks:hardened_clay_orange",
959 wherein = {"mcl_colorblocks:hardened_clay"},
960 clust_size = 1,
961 y_min = 43,
962 y_max = 44,
963 noise_threshold = 0.0,
964 noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70} ,
965 biomes = { "mesa" },
967 minetest.register_ore({
968 ore_type = "sheet",
969 ore = "mcl_colorblocks:hardened_clay_brown",
970 wherein = {"mcl_colorblocks:hardened_clay"},
971 clust_size = 1,
972 y_min = 44,
973 y_max = 45,
974 noise_threshold = 0.0,
975 noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70} ,
976 biomes = { "mesa" },
978 minetest.register_ore({
979 ore_type = "sheet",
980 ore = "mcl_colorblocks:hardened_clay_yellow",
981 wherein = {"mcl_colorblocks:hardened_clay"},
982 clust_size = 1,
983 y_min = 45,
984 y_max = 47,
985 noise_threshold = 0.0,
986 noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70} ,
987 biomes = { "mesa" },
989 minetest.register_ore({
990 ore_type = "sheet",
991 ore = "mcl_colorblocks:hardened_clay_white",
992 wherein = {"mcl_colorblocks:hardened_clay"},
993 clust_size = 1,
994 y_min = 49,
995 y_max = 52,
996 noise_threshold = 0.0,
997 noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70} ,
998 biomes = { "mesa" },
1000 minetest.register_ore({
1001 ore_type = "sheet",
1002 ore = "mcl_colorblocks:hardened_clay_yellow",
1003 wherein = {"mcl_colorblocks:hardened_clay"},
1004 clust_size = 4,
1005 y_min = 53,
1006 y_max = 59,
1007 noise_threshold = 0.0,
1008 noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70} ,
1010 minetest.register_ore({
1011 ore_type = "sheet",
1012 ore = "mcl_colorblocks:hardened_clay_white",
1013 wherein = {"mcl_colorblocks:hardened_clay"},
1014 clust_size = 8,
1015 y_min = 61,
1016 y_max = 70,
1017 noise_threshold = 0.0,
1018 noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70} ,
1019 biomes = { "mesa" },
1021 minetest.register_ore({
1022 ore_type = "sheet",
1023 ore = "mcl_colorblocks:hardened_clay_silver",
1024 wherein = {"mcl_colorblocks:hardened_clay"},
1025 clust_size = 8,
1026 y_min = 66,
1027 y_max = 75,
1028 noise_threshold = 0.0,
1029 noise_params = {offset=0, scale=1, spread={x=3100, y=3100, z=3100}, seed=23, octaves=3, persist=0.70} ,
1030 biomes = { "mesa" },
1034 -- Non-Overworld ores
1035 local function register_dimension_ores()
1037 --[[ NETHER GENERATION ]]
1039 -- Soul sand
1040 minetest.register_ore({
1041 ore_type = "sheet",
1042 ore = "mcl_nether:soul_sand",
1043 -- Note: Stone is included only for v6 mapgen support. Netherrack is not generated naturally
1044 -- in v6, but instead set with the on_generated function in mcl_mapgen_core.
1045 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1046 clust_scarcity = 13 * 13 * 13,
1047 clust_size = 5,
1048 y_min = mcl_vars.mg_nether_min,
1049 y_max = mcl_util.layer_to_y(64, "nether"),
1050 noise_threshold = 0.0,
1051 noise_params = {
1052 offset = 0.5,
1053 scale = 0.1,
1054 spread = {x = 5, y = 5, z = 5},
1055 seed = 2316,
1056 octaves = 1,
1057 persist = 0.0
1061 -- Magma blocks
1062 minetest.register_ore({
1063 ore_type = "blob",
1064 ore = "mcl_nether:magma",
1065 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1066 clust_scarcity = 8*8*8,
1067 clust_num_ores = 45,
1068 clust_size = 6,
1069 y_min = mcl_util.layer_to_y(23, "nether"),
1070 y_max = mcl_util.layer_to_y(37, "nether"),
1072 minetest.register_ore({
1073 ore_type = "blob",
1074 ore = "mcl_nether:magma",
1075 wherein = {"mcl_nether:netherrack"},
1076 clust_scarcity = 10*10*10,
1077 clust_num_ores = 65,
1078 clust_size = 8,
1079 y_min = mcl_util.layer_to_y(23, "nether"),
1080 y_max = mcl_util.layer_to_y(37, "nether"),
1083 -- Glowstone
1084 minetest.register_ore({
1085 ore_type = "blob",
1086 ore = "mcl_nether:glowstone",
1087 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1088 clust_scarcity = 26 * 26 * 26,
1089 clust_size = 5,
1090 y_min = mcl_vars.mg_lava_nether_max + 10,
1091 y_max = mcl_vars.mg_nether_max,
1092 noise_threshold = 0.0,
1093 noise_params = {
1094 offset = 0.5,
1095 scale = 0.1,
1096 spread = {x = 5, y = 5, z = 5},
1097 seed = 17676,
1098 octaves = 1,
1099 persist = 0.0
1103 -- Gravel (Nether)
1104 minetest.register_ore({
1105 ore_type = "sheet",
1106 ore = "mcl_core:gravel",
1107 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1108 column_height_min = 1,
1109 column_height_max = 1,
1110 column_midpoint_factor = 0,
1111 y_min = mcl_util.layer_to_y(63, "nether"),
1112 -- This should be 65, but for some reason with this setting, the sheet ore really stops at 65. o_O
1113 y_max = mcl_util.layer_to_y(65+2, "nether"),
1114 noise_threshold = 0.2,
1115 noise_params = {
1116 offset = 0.0,
1117 scale = 0.5,
1118 spread = {x = 20, y = 20, z = 20},
1119 seed = 766,
1120 octaves = 3,
1121 persist = 0.6,
1125 -- Nether quartz
1126 minetest.register_ore({
1127 ore_type = "scatter",
1128 ore = "mcl_nether:quartz_ore",
1129 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1130 clust_scarcity = 850,
1131 clust_num_ores = 4, -- MC cluster amount: 4-10
1132 clust_size = 3,
1133 y_min = mcl_vars.mg_nether_min,
1134 y_max = mcl_vars.mg_nether_max,
1136 minetest.register_ore({
1137 ore_type = "scatter",
1138 ore = "mcl_nether:quartz_ore",
1139 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1140 clust_scarcity = 1650,
1141 clust_num_ores = 8, -- MC cluster amount: 4-10
1142 clust_size = 4,
1143 y_min = mcl_vars.mg_nether_min,
1144 y_max = mcl_vars.mg_nether_max,
1147 -- Lava springs in the Nether
1148 minetest.register_ore({
1149 ore_type = "scatter",
1150 ore = "mcl_nether:nether_lava_source",
1151 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1152 clust_scarcity = 500,
1153 clust_num_ores = 1,
1154 clust_size = 1,
1155 y_min = mcl_vars.mg_nether_min,
1156 y_max = mcl_vars.mg_lava_nether_max + 1,
1159 minetest.register_ore({
1160 ore_type = "scatter",
1161 ore = "mcl_nether:nether_lava_source",
1162 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1163 clust_scarcity = 1000,
1164 clust_num_ores = 1,
1165 clust_size = 1,
1166 y_min = mcl_vars.mg_lava_nether_max + 2,
1167 y_max = mcl_vars.mg_lava_nether_max + 12,
1170 minetest.register_ore({
1171 ore_type = "scatter",
1172 ore = "mcl_nether:nether_lava_source",
1173 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1174 clust_scarcity = 2000,
1175 clust_num_ores = 1,
1176 clust_size = 1,
1177 y_min = mcl_vars.mg_lava_nether_max + 13,
1178 y_max = mcl_vars.mg_lava_nether_max + 48,
1180 minetest.register_ore({
1181 ore_type = "scatter",
1182 ore = "mcl_nether:nether_lava_source",
1183 wherein = {"mcl_nether:netherrack", "mcl_core:stone"},
1184 clust_scarcity = 3500,
1185 clust_num_ores = 1,
1186 clust_size = 1,
1187 y_min = mcl_vars.mg_lava_nether_max + 49,
1188 y_max = mcl_vars.mg_nether_max,
1191 --[[ THE END ]]
1193 -- Generate fake End
1194 -- TODO: Remove both "ores" when there's a better End generator
1196 minetest.register_ore({
1197 ore_type = "sheet",
1198 ore = "mcl_end:end_stone",
1199 wherein = {"air"},
1200 y_min = mcl_vars.mg_end_min+64,
1201 y_max = mcl_vars.mg_end_min+80,
1202 column_height_min = 6,
1203 column_height_max = 7,
1204 column_midpoint_factor = 0.0,
1205 noise_params = {
1206 offset = -2,
1207 scale = 8,
1208 spread = {x=100, y=100, z=100},
1209 seed = 2999,
1210 octaves = 5,
1211 persist = 0.55,
1213 noise_threshold = 0,
1216 minetest.register_ore({
1217 ore_type = "sheet",
1218 ore = "mcl_end:end_stone",
1219 wherein = {"air"},
1220 y_min = mcl_vars.mg_end_min+64,
1221 y_max = mcl_vars.mg_end_min+80,
1222 column_height_min = 4,
1223 column_height_max = 4,
1224 column_midpoint_factor = 0.0,
1225 noise_params = {
1226 offset = -4,
1227 scale = 3,
1228 spread = {x=200, y=200, z=200},
1229 seed = 5390,
1230 octaves = 5,
1231 persist = 0.6,
1233 noise_threshold = 0,
1239 -- All mapgens except mgv6
1241 -- Template to register a grass or fern decoration
1242 local function register_grass_decoration(grasstype, offset, scale, biomes)
1243 local place_on, seed, node
1244 if grasstype == "fern" then
1245 node = "mcl_flowers:fern"
1246 place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol"}
1247 seed = 333
1248 elseif grasstype == "tallgrass" then
1249 node = "mcl_flowers:tallgrass"
1250 place_on = {"mcl_core:dirt_with_grass"}
1251 seed = 420
1253 local noise = {
1254 offset = offset,
1255 scale = scale,
1256 spread = {x = 200, y = 200, z = 200},
1257 seed = seed,
1258 octaves = 3,
1259 persist = 0.6
1261 minetest.register_decoration({
1262 deco_type = "simple",
1263 place_on = place_on,
1264 sidelen = 16,
1265 noise_params = noise,
1266 biomes = biomes,
1267 y_min = 1,
1268 y_max = mcl_vars.mg_overworld_max,
1269 decoration = node,
1273 local function register_decorations()
1274 -- Large ice spike
1275 minetest.register_decoration({
1276 deco_type = "schematic",
1277 place_on = {"mcl_core:snowblock", "mcl_core:snow", "mcl_core:dirt_with_grass_snow"},
1278 sidelen = 80,
1279 noise_params = {
1280 offset = 0.00040,
1281 scale = 0.001,
1282 spread = {x = 250, y = 250, z = 250},
1283 seed = 1133,
1284 octaves = 4,
1285 persist = 0.67,
1287 biomes = {"ice_plains_spike"},
1288 y_min = 4,
1289 y_max = mcl_vars.mg_overworld_max,
1290 schematic = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_large.mts",
1291 rotation = "random",
1292 flags = "place_center_x, place_center_z",
1295 -- Small ice spike
1296 minetest.register_decoration({
1297 deco_type = "schematic",
1298 place_on = {"mcl_core:snowblock", "mcl_core:snow", "mcl_core:dirt_with_grass_snow"},
1299 sidelen = 80,
1300 noise_params = {
1301 offset = 0.005,
1302 scale = 0.001,
1303 spread = {x = 250, y = 250, z = 250},
1304 seed = 1133,
1305 octaves = 4,
1306 persist = 0.67,
1308 biomes = {"ice_plains_spike"},
1309 y_min = 4,
1310 y_max = mcl_vars.mg_overworld_max,
1311 schematic = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_ice_spike_small.mts",
1312 rotation = "random",
1313 flags = "place_center_x, place_center_z",
1316 -- Oak
1317 -- Large oaks
1318 minetest.register_decoration({
1319 deco_type = "schematic",
1320 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1321 sidelen = 80,
1322 noise_params = {
1323 offset = 0.00075,
1324 scale = 0.0011,
1325 spread = {x = 250, y = 250, z = 250},
1326 seed = 3,
1327 octaves = 3,
1328 persist = 0.66
1330 biomes = {"forest"},
1331 y_min = 1,
1332 y_max = mcl_vars.mg_overworld_max,
1333 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_large_1.mts",
1334 flags = "place_center_x, place_center_z",
1335 rotation = "random",
1337 minetest.register_decoration({
1338 deco_type = "schematic",
1339 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1340 sidelen = 80,
1341 noise_params = {
1342 offset = 0.00075,
1343 scale = 0.0011,
1344 spread = {x = 250, y = 250, z = 250},
1345 seed = 3,
1346 octaves = 3,
1347 persist = 0.66
1349 biomes = {"forest"},
1350 y_min = 1,
1351 y_max = mcl_vars.mg_overworld_max,
1352 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_large_2.mts",
1353 flags = "place_center_x, place_center_z",
1354 rotation = "random",
1356 -- Small classic oak (forest, flower forest and ice plains)
1357 minetest.register_decoration({
1358 deco_type = "schematic",
1359 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1360 sidelen = 16,
1361 noise_params = {
1362 offset = 0.025,
1363 scale = 0.0022,
1364 spread = {x = 250, y = 250, z = 250},
1365 seed = 2,
1366 octaves = 3,
1367 persist = 0.66
1369 biomes = {"forest"},
1370 y_min = 1,
1371 y_max = mcl_vars.mg_overworld_max,
1372 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1373 flags = "place_center_x, place_center_z",
1374 rotation = "random",
1376 minetest.register_decoration({
1377 deco_type = "schematic",
1378 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1379 sidelen = 16,
1380 noise_params = {
1381 offset = 0.01,
1382 scale = 0.0022,
1383 spread = {x = 250, y = 250, z = 250},
1384 seed = 2,
1385 octaves = 3,
1386 persist = 0.66
1388 biomes = {"flower_forest"},
1389 y_min = 1,
1390 y_max = mcl_vars.mg_overworld_max,
1391 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1392 flags = "place_center_x, place_center_z",
1393 rotation = "random",
1395 minetest.register_decoration({
1396 deco_type = "schematic",
1397 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:dirt_with_grass_snow"},
1398 sidelen = 16,
1399 noise_params = {
1400 offset = 0.0,
1401 scale = 0.0002,
1402 spread = {x = 250, y = 250, z = 250},
1403 seed = 2,
1404 octaves = 3,
1405 persist = 0.7
1407 biomes = {"ice_plains"},
1408 y_min = 1,
1409 y_max = mcl_vars.mg_overworld_max,
1410 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1411 flags = "place_center_x, place_center_z",
1412 rotation = "random",
1414 -- Rare balloon oak
1415 minetest.register_decoration({
1416 deco_type = "schematic",
1417 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1418 sidelen = 16,
1419 noise_params = {
1420 offset = 0.002083,
1421 scale = 0.0022,
1422 spread = {x = 250, y = 250, z = 250},
1423 seed = 3,
1424 octaves = 3,
1425 persist = 0.6,
1427 biomes = {"forest"},
1428 y_min = 1,
1429 y_max = mcl_vars.mg_overworld_max,
1430 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_balloon.mts",
1431 flags = "place_center_x, place_center_z",
1432 rotation = "random",
1434 -- Swamp oak
1435 minetest.register_decoration({
1436 deco_type = "schematic",
1437 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1438 sidelen = 80,
1439 noise_params = {
1440 offset = 0.0055,
1441 scale = 0.0011,
1442 spread = {x = 250, y = 250, z = 250},
1443 seed = 5005,
1444 octaves = 5,
1445 persist = 0.6,
1447 biomes = {"swampland", "swampland_shore"},
1448 y_min = 0,
1449 y_max = mcl_vars.mg_overworld_max,
1450 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_swamp.mts",
1451 flags = "place_center_x, place_center_z",
1452 rotation = "random",
1455 -- Jungle tree
1456 minetest.register_decoration({
1457 deco_type = "schematic",
1458 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1459 sidelen = 80,
1460 fill_ratio = 0.0025,
1461 biomes = {"jungle"},
1462 y_min = 4,
1463 y_max = mcl_vars.mg_overworld_max,
1464 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree_huge.mts",
1465 flags = "place_center_x, place_center_z",
1466 rotation = "random",
1468 minetest.register_decoration({
1469 deco_type = "schematic",
1470 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1471 sidelen = 80,
1472 fill_ratio = 0.045,
1473 biomes = {"jungle"},
1474 y_min = 1,
1475 y_max = mcl_vars.mg_overworld_max,
1476 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree.mts",
1477 flags = "place_center_x, place_center_z",
1478 rotation = "random",
1480 minetest.register_decoration({
1481 deco_type = "schematic",
1482 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1483 sidelen = 80,
1484 fill_ratio = 0.0045,
1485 biomes = {"jungle_edge"},
1486 y_min = 1,
1487 y_max = mcl_vars.mg_overworld_max,
1488 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_tree.mts",
1489 flags = "place_center_x, place_center_z",
1490 rotation = "random",
1493 -- Oak in jungle / jungle edge
1494 minetest.register_decoration({
1495 deco_type = "schematic",
1496 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1497 sidelen = 80,
1498 fill_ratio = 0.004,
1499 biomes = {"jungle"},
1500 y_min = 1,
1501 y_max = mcl_vars.mg_overworld_max,
1502 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1503 flags = "place_center_x, place_center_z",
1504 rotation = "random",
1506 minetest.register_decoration({
1507 deco_type = "schematic",
1508 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1509 sidelen = 80,
1510 fill_ratio = 0.0004,
1511 biomes = {"jungle_edge"},
1512 y_min = 1,
1513 y_max = mcl_vars.mg_overworld_max,
1514 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_oak_classic.mts",
1515 flags = "place_center_x, place_center_z",
1516 rotation = "random",
1519 -- Spruce
1520 local function quick_spruce(seed, offset, sprucename, biomes)
1521 minetest.register_decoration({
1522 deco_type = "schematic",
1523 place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"},
1524 sidelen = 16,
1525 noise_params = {
1526 offset = offset,
1527 scale = 0.0006,
1528 spread = {x = 250, y = 250, z = 250},
1529 seed = seed,
1530 octaves = 3,
1531 persist = 0.66
1533 biomes = biomes,
1534 y_min = 2,
1535 y_max = mcl_vars.mg_overworld_max,
1536 schematic = minetest.get_modpath("mcl_core").."/schematics/"..sprucename,
1537 flags = "place_center_x, place_center_z",
1541 -- Huge spruce
1542 quick_spruce(3000, 0.001, "mcl_core_spruce_huge_1.mts", {"mega_spruce_taiga"})
1543 quick_spruce(4000, 0.00112, "mcl_core_spruce_huge_2.mts", {"mega_spruce_taiga"})
1544 quick_spruce(6000, 0.001, "mcl_core_spruce_huge_3.mts", {"mega_spruce_taiga"})
1546 -- Common spruce
1547 quick_spruce(2500, 0.0062, "mcl_core_spruce_1.mts", {"mega_spruce_taiga", "mega_taiga", "taiga", "cold_taiga"})
1548 quick_spruce(5000, 0.0065, "mcl_core_spruce_2.mts", {"mega_spruce_taiga", "mega_taiga", "taiga", "cold_taiga"})
1549 quick_spruce(7000, 0.005, "mcl_core_spruce_3.mts", {"mega_spruce_taiga", "mega_taiga", "taiga", "cold_taiga"})
1551 -- Small lollipop spruce
1552 minetest.register_decoration({
1553 deco_type = "schematic",
1554 place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"},
1555 sidelen = 16,
1556 noise_params = {
1557 offset = 0.004,
1558 scale = 0.0022,
1559 spread = {x = 250, y = 250, z = 250},
1560 seed = 2500,
1561 octaves = 3,
1562 persist = 0.66
1564 biomes = {"taiga", "cold_taiga"},
1565 y_min = 2,
1566 y_max = mcl_vars.mg_overworld_max,
1567 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_spruce_lollipop.mts",
1568 flags = "place_center_x, place_center_z",
1571 -- Matchstick spruce: Very few leaves, tall trunk
1572 minetest.register_decoration({
1573 deco_type = "schematic",
1574 place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol"},
1575 sidelen = 80,
1576 noise_params = {
1577 offset = -0.025,
1578 scale = 0.025,
1579 spread = {x = 250, y = 250, z = 250},
1580 seed = 2566,
1581 octaves = 5,
1582 persist = 0.60,
1584 biomes = {"taiga", "cold_taiga"},
1585 y_min = 3,
1586 y_max = mcl_vars.mg_overworld_max,
1587 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_spruce_matchstick.mts",
1588 flags = "place_center_x, place_center_z",
1591 -- Acacia
1592 minetest.register_decoration({
1593 deco_type = "schematic",
1594 place_on = {"mcl_core:dirt_with_grass", "mcl_core:coarse_dirt"},
1595 sidelen = 16,
1596 noise_params = {
1597 offset = 0.00075,
1598 scale = 0.002,
1599 spread = {x = 250, y = 250, z = 250},
1600 seed = 26,
1601 octaves = 3,
1602 persist = 0.66
1604 biomes = {"savanna"},
1605 y_min = 1,
1606 y_max = mcl_vars.mg_overworld_max,
1607 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_acacia_classic_1.mts",
1608 flags = "place_center_x, place_center_z",
1609 rotation = "random",
1612 minetest.register_decoration({
1613 deco_type = "schematic",
1614 place_on = {"mcl_core:dirt_with_grass", "mcl_core:coarse_dirt"},
1615 sidelen = 16,
1616 noise_params = {
1617 offset = 0.00075,
1618 scale = 0.002,
1619 spread = {x = 250, y = 250, z = 250},
1620 seed = 25,
1621 octaves = 3,
1622 persist = 0.66
1624 biomes = {"savanna"},
1625 y_min = 1,
1626 y_max = mcl_vars.mg_overworld_max,
1627 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_acacia_classic_2.mts",
1628 flags = "place_center_x, place_center_z",
1629 rotation = "random",
1632 -- Birch
1633 minetest.register_decoration({
1634 deco_type = "schematic",
1635 place_on = {"mcl_core:dirt_with_grass"},
1636 sidelen = 16,
1637 noise_params = {
1638 offset = 0.03,
1639 scale = 0.0025,
1640 spread = {x = 250, y = 250, z = 250},
1641 seed = 11,
1642 octaves = 3,
1643 persist = 0.66
1645 biomes = {"birch_forest"},
1646 y_min = 1,
1647 y_max = mcl_vars.mg_overworld_max,
1648 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_birch.mts",
1649 flags = "place_center_x, place_center_z",
1651 minetest.register_decoration({
1652 deco_type = "schematic",
1653 place_on = {"mcl_core:dirt_with_grass"},
1654 sidelen = 16,
1655 noise_params = {
1656 offset = 0.03,
1657 scale = 0.0025,
1658 spread = {x = 250, y = 250, z = 250},
1659 seed = 11,
1660 octaves = 3,
1661 persist = 0.66
1663 biomes = {"birch_forest_m"},
1664 y_min = 1,
1665 y_max = mcl_vars.mg_overworld_max,
1666 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_birch_tall.mts",
1667 flags = "place_center_x, place_center_z",
1670 minetest.register_decoration({
1671 deco_type = "schematic",
1672 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
1673 sidelen = 16,
1674 noise_params = {
1675 offset = 0.000333,
1676 scale = -0.0015,
1677 spread = {x = 250, y = 250, z = 250},
1678 seed = 11,
1679 octaves = 3,
1680 persist = 0.66
1682 biomes = {"flower_forest"},
1683 y_min = 1,
1684 y_max = mcl_vars.mg_overworld_max,
1685 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_birch.mts",
1686 flags = "place_center_x, place_center_z",
1688 minetest.register_decoration({
1689 deco_type = "schematic",
1690 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
1691 sidelen = 16,
1692 noise_params = {
1693 offset = -0.00075,
1694 scale = -0.0015,
1695 spread = {x = 250, y = 250, z = 250},
1696 seed = 11,
1697 octaves = 3,
1698 persist = 0.7
1700 biomes = {"ice_plains"},
1701 y_min = 1,
1702 y_max = mcl_vars.mg_overworld_max,
1703 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_birch.mts",
1704 flags = "place_center_x, place_center_z",
1707 -- Dark Oak
1708 minetest.register_decoration({
1709 deco_type = "schematic",
1710 place_on = {"mcl_core:dirt_with_grass"},
1711 sidelen = 16,
1712 noise_params = {
1713 offset = 0.05,
1714 scale = 0.0015,
1715 spread = {x = 125, y = 125, z = 125},
1716 seed = 223,
1717 octaves = 3,
1718 persist = 0.66
1720 biomes = {"roofed_forest"},
1721 y_min = 4,
1722 y_max = mcl_vars.mg_overworld_max,
1723 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_dark_oak.mts",
1724 flags = "place_center_x, place_center_z",
1725 rotation = "random",
1729 local ratio_mushroom = 0.0001
1730 local ratio_mushroom_huge = ratio_mushroom * (11/12)
1731 local ratio_mushroom_giant = ratio_mushroom * (1/12)
1732 local ratio_mushroom_mycelium = 0.002
1733 local ratio_mushroom_mycelium_huge = ratio_mushroom_mycelium * (11/12)
1734 local ratio_mushroom_mycelium_giant = ratio_mushroom_mycelium * (1/12)
1736 -- Huge Brown Mushroom
1737 minetest.register_decoration({
1738 deco_type = "schematic",
1739 place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
1740 sidelen = 80,
1741 fill_ratio = ratio_mushroom_huge,
1742 biomes = { "roofed_forest" },
1743 y_min = 1,
1744 y_max = mcl_vars.mg_overworld_max,
1745 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts",
1746 flags = "place_center_x, place_center_z",
1747 rotation = "random",
1749 minetest.register_decoration({
1750 deco_type = "schematic",
1751 place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
1752 sidelen = 80,
1753 fill_ratio = ratio_mushroom_giant,
1754 biomes = { "roofed_forest" },
1755 y_min = 1,
1756 y_max = mcl_vars.mg_overworld_max,
1757 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_brown.mts",
1758 flags = "place_center_x, place_center_z",
1759 rotation = "random",
1762 minetest.register_decoration({
1763 deco_type = "schematic",
1764 place_on = { "mcl_core:mycelium" },
1765 sidelen = 80,
1766 fill_ratio = ratio_mushroom_mycelium_huge,
1767 biomes = { "mushroom_island", "mushroom_island_shore" },
1768 y_min = 1,
1769 y_max = mcl_vars.mg_overworld_max,
1770 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts",
1771 flags = "place_center_x, place_center_z",
1772 rotation = "random",
1774 minetest.register_decoration({
1775 deco_type = "schematic",
1776 place_on = { "mcl_core:mycelium" },
1777 sidelen = 80,
1778 fill_ratio = ratio_mushroom_mycelium_giant,
1779 biomes = { "mushroom_island", "mushroom_island_shore" },
1780 y_min = 1,
1781 y_max = mcl_vars.mg_overworld_max,
1782 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_brown.mts",
1783 flags = "place_center_x, place_center_z",
1784 rotation = "random",
1787 -- Huge Red Mushroom
1788 minetest.register_decoration({
1789 deco_type = "schematic",
1790 place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
1791 sidelen = 80,
1792 fill_ratio = ratio_mushroom_huge,
1793 biomes = { "roofed_forest" },
1794 y_min = 1,
1795 y_max = mcl_vars.mg_overworld_max,
1796 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts",
1797 flags = "place_center_x, place_center_z",
1798 rotation = "random",
1800 minetest.register_decoration({
1801 deco_type = "schematic",
1802 place_on = { "mcl_core:dirt_with_grass", "mcl_core:dirt" },
1803 sidelen = 80,
1804 fill_ratio = ratio_mushroom_giant,
1805 biomes = { "roofed_forest" },
1806 y_min = 1,
1807 y_max = mcl_vars.mg_overworld_max,
1808 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_red.mts",
1809 flags = "place_center_x, place_center_z",
1810 rotation = "random",
1813 minetest.register_decoration({
1814 deco_type = "schematic",
1815 place_on = { "mcl_core:mycelium" },
1816 sidelen = 80,
1817 fill_ratio = ratio_mushroom_mycelium_huge,
1818 biomes = { "mushroom_island", "mushroom_island_shore" },
1819 y_min = 1,
1820 y_max = mcl_vars.mg_overworld_max,
1821 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts",
1822 flags = "place_center_x, place_center_z",
1823 rotation = "random",
1825 minetest.register_decoration({
1826 deco_type = "schematic",
1827 place_on = { "mcl_core:mycelium" },
1828 sidelen = 80,
1829 fill_ratio = ratio_mushroom_mycelium_giant,
1830 biomes = { "mushroom_island", "mushroom_island_shore" },
1831 y_min = 1,
1832 y_max = mcl_vars.mg_overworld_max,
1833 schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_giant_red.mts",
1834 flags = "place_center_x, place_center_z",
1835 rotation = "random",
1838 -- Moss stone boulder (3×3)
1839 minetest.register_decoration({
1840 deco_type = "schematic",
1841 place_on = {"mcl_core:podzol", "mcl_core:dirt", "mcl_core:coarse_dirt"},
1842 sidelen = 80,
1843 noise_params = {
1844 offset = 0.00015,
1845 scale = 0.001,
1846 spread = {x = 300, y = 300, z = 300},
1847 seed = 775703,
1848 octaves = 4,
1849 persist = 0.63,
1851 biomes = {"mega_taiga", "mega_spruce_taiga"},
1852 y_min = 1,
1853 y_max = mcl_vars.mg_overworld_max,
1854 schematic = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_boulder.mts",
1855 flags = "place_center_x, place_center_z",
1858 -- Small moss stone boulder (2×2)
1859 minetest.register_decoration({
1860 deco_type = "schematic",
1861 place_on = {"mcl_core:podzol", "mcl_core:dirt", "mcl_core:coarse_dirt"},
1862 sidelen = 80,
1863 noise_params = {
1864 offset = 0.001,
1865 scale = 0.001,
1866 spread = {x = 300, y = 300, z = 300},
1867 seed = 775703,
1868 octaves = 4,
1869 persist = 0.63,
1871 biomes = {"mega_taiga", "mega_spruce_taiga"},
1872 y_min = 1,
1873 y_max = mcl_vars.mg_overworld_max,
1874 schematic = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_boulder_small.mts",
1875 flags = "place_center_x, place_center_z",
1878 -- Cacti
1879 minetest.register_decoration({
1880 deco_type = "simple",
1881 place_on = {"group:sand"},
1882 sidelen = 16,
1883 noise_params = {
1884 offset = -0.012,
1885 scale = 0.024,
1886 spread = {x = 100, y = 100, z = 100},
1887 seed = 257,
1888 octaves = 3,
1889 persist = 0.6
1891 y_min = 4,
1892 y_max = mcl_vars.mg_overworld_max,
1893 decoration = "mcl_core:cactus",
1894 biomes = {"red_desert","desert"},
1895 height = 1,
1896 height_max = 3,
1899 -- Sugar canes
1900 minetest.register_decoration({
1901 deco_type = "simple",
1902 place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_core:dirt_with_grass", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
1903 sidelen = 16,
1904 noise_params = {
1905 offset = -0.3,
1906 scale = 0.7,
1907 spread = {x = 100, y = 100, z = 100},
1908 seed = 2,
1909 octaves = 3,
1910 persist = 0.7
1912 biomes = {"plains", "plains_beach", "taiga_beach", "ice_plains", "cold_taiga_beach", "savanna_beach", "forest_beach", "red_desert", "desert"},
1913 y_min = 1,
1914 y_max = mcl_vars.mg_overworld_max,
1915 decoration = "mcl_core:reeds",
1916 height = 1,
1917 height_max = 3,
1918 spawn_by = { "mcl_core:water_source", "group:frosted_ice" },
1919 num_spawn_by = 1,
1921 minetest.register_decoration({
1922 deco_type = "simple",
1923 place_on = {"mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_core:dirt_with_grass", "group:sand", "mcl_core:podzol", "mcl_core:reeds"},
1924 sidelen = 16,
1925 noise_params = {
1926 offset = 0.0,
1927 scale = 0.5,
1928 spread = {x = 100, y = 100, z = 100},
1929 seed = 2,
1930 octaves = 3,
1931 persist = 0.7,
1933 biomes = {"swampland"},
1934 y_min = 1,
1935 y_max = mcl_vars.mg_overworld_max,
1936 decoration = "mcl_core:reeds",
1937 height = 1,
1938 height_max = 3,
1939 spawn_by = { "mcl_core:water_source", "group:frosted_ice" },
1940 num_spawn_by = 1,
1943 -- Doubletall grass
1944 minetest.register_decoration({
1945 deco_type = "schematic",
1946 schematic = {
1947 size = { x=1, y=3, z=1 },
1948 data = {
1949 { name = "air", prob = 0 },
1950 { name = "mcl_flowers:double_grass", param1=255, },
1951 { name = "mcl_flowers:double_grass_top", param1=255, },
1954 replacements = {
1955 ["mcl_flowers:tallgrass"] = "mcl_flowers:double_grass"
1957 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
1958 sidelen = 16,
1959 noise_params = {
1960 offset = -0.01,
1961 scale = 0.03,
1962 spread = {x = 300, y = 300, z = 300},
1963 seed = 420,
1964 octaves = 2,
1965 persist = 0.6,
1967 y_min = 1,
1968 y_max = mcl_vars.mg_overworld_max,
1969 biomes = {"plains", "sunflower_plains", "taiga", "forest", "flower_forest", "birch_forest", "birch_forest_m", "roofed_forest", "savanna"},
1972 -- Large ferns
1973 minetest.register_decoration({
1974 deco_type = "schematic",
1975 schematic = {
1976 size = { x=1, y=3, z=1 },
1977 data = {
1978 { name = "air", prob = 0 },
1979 { name = "mcl_flowers:double_fern", param1=255, },
1980 { name = "mcl_flowers:double_fern_top", param1=255, },
1983 replacements = {
1984 ["mcl_flowers:fern"] = "mcl_flowers:double_fern"
1986 place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:podzol_snow"},
1988 sidelen = 16,
1989 noise_params = {
1990 offset = 0.01,
1991 scale = 0.01,
1992 spread = {x = 250, y = 250, z = 250},
1993 seed = 333,
1994 octaves = 2,
1995 persist = 0.66,
1997 biomes = { "jungle", "jungle_edge", "taiga", "cold_taiga", "mega_taiga", "mega_spruce_taiga" },
1998 y_min = 1,
1999 y_max = mcl_vars.mg_overworld_max,
2002 -- Large flowers
2003 local register_large_flower = function(name, biomes, seed, offset, flower_forest_offset)
2004 local maxi
2005 if flower_forest_offset then
2006 maxi = 2
2007 else
2008 maxi = 1
2010 for i=1, maxi do
2011 local o, b -- offset, biomes
2012 if i == 1 then
2013 o = offset
2014 b = biomes
2015 else
2016 o = flower_forest_offset
2017 b = { "flower_forest" }
2020 minetest.register_decoration({
2021 deco_type = "schematic",
2022 schematic = {
2023 size = { x=1, y=3, z=1 },
2024 data = {
2025 { name = "air", prob = 0 },
2026 { name = "mcl_flowers:"..name, param1=255, },
2027 { name = "mcl_flowers:"..name.."_top", param1=255, },
2030 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2032 sidelen = 16,
2033 noise_params = {
2034 offset = o,
2035 scale = 0.01,
2036 spread = {x = 300, y = 300, z = 300},
2037 seed = seed,
2038 octaves = 5,
2039 persist = 0.62,
2041 y_min = 1,
2042 y_max = mcl_vars.mg_overworld_max,
2043 flags = "",
2044 biomes = b,
2049 register_large_flower("rose_bush", {"forest"}, 9350, -0.008, 0.003)
2050 register_large_flower("peony", {"forest"}, 10450, -0.008, 0.003)
2051 register_large_flower("lilac", {"forest"}, 10600, -0.007, 0.003)
2052 -- TODO
2053 register_large_flower("sunflower", {"plains", "sunflower_plains"}, 2940, 0.0)
2055 -- Jungle bush
2056 minetest.register_decoration({
2057 deco_type = "schematic",
2058 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2059 sidelen = 80,
2060 noise_params = {
2061 offset = 0.0196,
2062 scale = 0.025,
2063 spread = {x = 250, y = 250, z = 250},
2064 seed = 2930,
2065 octaves = 4,
2066 persist = 0.6,
2068 biomes = {"jungle"},
2069 y_min = 3,
2070 y_max = mcl_vars.mg_overworld_max,
2071 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_bush.mts",
2072 flags = "place_center_x, place_center_z",
2074 minetest.register_decoration({
2075 deco_type = "schematic",
2076 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2077 sidelen = 80,
2078 noise_params = {
2079 offset = 0.0085,
2080 scale = 0.025,
2081 spread = {x = 250, y = 250, z = 250},
2082 seed = 2930,
2083 octaves = 4,
2084 persist = 0.6,
2086 biomes = {"jungle_edge"},
2087 y_min = 3,
2088 y_max = mcl_vars.mg_overworld_max,
2089 schematic = minetest.get_modpath("mcl_core").."/schematics/mcl_core_jungle_bush.mts",
2090 flags = "place_center_x, place_center_z",
2093 -- Fallen logs
2094 minetest.register_decoration({
2095 deco_type = "schematic",
2096 place_on = {"mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:coarse_dirt"},
2097 sidelen = 80,
2098 noise_params = {
2099 offset = 0.00018,
2100 scale = 0.00011,
2101 spread = {x = 250, y = 250, z = 250},
2102 seed = 2,
2103 octaves = 3,
2104 persist = 0.66
2106 biomes = {"mega_taiga", "mega_spruce_taiga", "taiga"},
2107 y_min = 1,
2108 y_max = mcl_vars.mg_overworld_max,
2109 schematic = {
2110 size = {x = 4, y = 3, z = 1},
2111 data = {
2112 {name = "air", prob = 0},
2113 {name = "air", prob = 0},
2114 {name = "air", prob = 0},
2115 {name = "air", prob = 0},
2116 {name = "mcl_core:sprucetree", param2 = 12, prob = 127},
2117 {name = "mcl_core:sprucetree", param2 = 12},
2118 {name = "mcl_core:sprucetree", param2 = 12},
2119 {name = "mcl_core:sprucetree", param2 = 12, prob = 127},
2120 {name = "air", prob = 0},
2121 {name = "mcl_mushrooms:mushroom_brown", prob = 160},
2122 {name = "mcl_mushrooms:mushroom_red", prob = 160},
2123 {name = "air", prob = 0},
2126 flags = "place_center_x",
2127 rotation = "random",
2130 minetest.register_decoration({
2131 deco_type = "schematic",
2132 place_on = {"mcl_core:dirt_with_grass_snow", "mcl_core:dirt_with_grass", "mcl_core:podzol", "mcl_core:podzol_snow", "mcl_core:coarse_dirt"},
2133 sidelen = 80,
2134 noise_params = {
2135 offset = 0.00018,
2136 scale = 0.00011,
2137 spread = {x = 250, y = 250, z = 250},
2138 seed = 2,
2139 octaves = 3,
2140 persist = 0.66
2142 biomes = {"cold_taiga"},
2143 y_min = 1,
2144 y_max = mcl_vars.mg_overworld_max,
2145 schematic = {
2146 size = {x = 4, y = 3, z = 1},
2147 data = {
2148 {name = "air", prob = 0},
2149 {name = "air", prob = 0},
2150 {name = "air", prob = 0},
2151 {name = "air", prob = 0},
2152 {name = "mcl_core:sprucetree", param2 = 12, prob = 127},
2153 {name = "mcl_core:sprucetree", param2 = 12},
2154 {name = "mcl_core:sprucetree", param2 = 12},
2155 {name = "mcl_core:sprucetree", param2 = 12, prob = 127},
2156 {name = "air", prob = 0},
2157 {name = "air", prob = 0},
2158 {name = "air", prob = 0},
2159 {name = "air", prob = 0},
2162 flags = "place_center_x",
2163 rotation = "random",
2166 minetest.register_decoration({
2167 deco_type = "schematic",
2168 place_on = {"mcl_core:dirt_with_grass"},
2169 sidelen = 16,
2170 noise_params = {
2171 offset = 0.0,
2172 scale = -0.00008,
2173 spread = {x = 250, y = 250, z = 250},
2174 seed = 2,
2175 octaves = 3,
2176 persist = 0.66
2178 biomes = {"forest", "birch_forest", "birch_forest_m",},
2179 y_min = 1,
2180 y_max = mcl_vars.mg_overworld_max,
2181 schematic = {
2182 size = {x = 3, y = 3, z = 1},
2183 data = {
2184 {name = "air", prob = 0},
2185 {name = "air", prob = 0},
2186 {name = "air", prob = 0},
2187 {name = "mcl_core:birchtree", param2 = 12},
2188 {name = "mcl_core:birchtree", param2 = 12},
2189 {name = "mcl_core:birchtree", param2 = 12, prob = 127},
2190 {name = "mcl_mushrooms:mushroom_red", prob = 100},
2191 {name = "mcl_mushrooms:mushroom_brown", prob = 10},
2192 {name = "air", prob = 0},
2195 flags = "place_center_x",
2196 rotation = "random",
2199 minetest.register_decoration({
2200 deco_type = "schematic",
2201 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2202 sidelen = 80,
2203 fill_ratio = 0.005,
2204 biomes = {"jungle"},
2205 y_min = 1,
2206 y_max = mcl_vars.mg_overworld_max,
2207 schematic = {
2208 size = {x = 4, y = 3, z = 1},
2209 data = {
2210 {name = "air", prob = 0},
2211 {name = "air", prob = 0},
2212 {name = "air", prob = 0},
2213 {name = "air", prob = 0},
2214 {name = "mcl_core:jungletree", param2 = 12, prob = 127},
2215 {name = "mcl_core:jungletree", param2 = 12},
2216 {name = "mcl_core:jungletree", param2 = 12},
2217 {name = "mcl_core:jungletree", param2 = 12, prob = 127},
2218 {name = "air", prob = 0},
2219 {name = "mcl_mushrooms:mushroom_brown", prob = 50},
2220 {name = "air", prob = 0},
2221 {name = "air", prob = 0},
2224 flags = "place_center_x",
2225 rotation = "random",
2228 minetest.register_decoration({
2229 deco_type = "schematic",
2230 place_on = {"mcl_core:dirt_with_grass"},
2231 sidelen = 16,
2232 noise_params = {
2233 offset = 0.00018,
2234 scale = 0.00011,
2235 spread = {x = 250, y = 250, z = 250},
2236 seed = 2,
2237 octaves = 3,
2238 persist = 0.66
2240 biomes = {"forest"},
2241 y_min = 1,
2242 y_max = mcl_vars.mg_overworld_max,
2243 schematic = {
2244 size = {x = 3, y = 3, z = 1},
2245 data = {
2246 {name = "air", prob = 0},
2247 {name = "air", prob = 0},
2248 {name = "air", prob = 0},
2249 {name = "mcl_core:tree", param2 = 12, prob = 127},
2250 {name = "mcl_core:tree", param2 = 12},
2251 {name = "mcl_core:tree", param2 = 12},
2252 {name = "air", prob = 0},
2253 {name = "mcl_mushrooms:mushroom_brown", prob = 96},
2254 {name = "mcl_mushrooms:mushroom_red", prob = 96},
2257 flags = "place_center_x",
2258 rotation = "random",
2261 -- Lily pad
2263 local lily_schem = {
2264 { name = "mcl_core:water_source" },
2265 { name = "mcl_flowers:waterlily" },
2268 -- Spawn them in shallow water at ocean level in swamplands.
2269 -- Tweak lilydepth to change the maximum water depth
2270 local lilydepth = 2
2272 for d=1, lilydepth do
2273 local height = d + 2
2274 local y = 1 - d
2275 table.insert(lily_schem, 1, { name = "air", prob = 0 })
2277 minetest.register_decoration({
2278 deco_type = "schematic",
2279 schematic = {
2280 size = { x=1, y=height, z=1 },
2281 data = lily_schem,
2283 place_on = "mcl_core:dirt",
2284 sidelen = 16,
2285 noise_params = {
2286 offset = 0,
2287 scale = 0.3,
2288 spread = {x = 100, y = 100, z = 100},
2289 seed = 503,
2290 octaves = 6,
2291 persist = 0.7,
2293 y_min = y,
2294 y_max = y,
2295 biomes = { "swampland_shore" },
2296 rotation = "random",
2300 -- Melon
2301 minetest.register_decoration({
2302 deco_type = "simple",
2303 place_on = {"mcl_core:dirt_with_grass"},
2304 sidelen = 16,
2305 noise_params = {
2306 offset = 0.002,
2307 scale = 0.006,
2308 spread = {x = 250, y = 250, z = 250},
2309 seed = 333,
2310 octaves = 3,
2311 persist = 0.6
2313 y_min = 1,
2314 y_max = mcl_vars.mg_overworld_max,
2315 decoration = "mcl_farming:melon",
2316 biomes = { "jungle", "jungle_edge" },
2319 -- Pumpkin
2320 minetest.register_decoration({
2321 deco_type = "schematic",
2322 schematic = {
2323 size = { x=1, y=2, z=1 },
2324 data = {
2325 { name = "air", prob = 0 },
2326 { name = "mcl_farming:pumpkin_face", param1=255, },
2329 place_on = {"mcl_core:dirt_with_grass"},
2330 sidelen = 16,
2331 noise_params = {
2332 offset = -0.016,
2333 scale = 0.01332,
2334 spread = {x = 125, y = 125, z = 125},
2335 seed = 666,
2336 octaves = 6,
2337 persist = 0.666
2339 biomes = {"plains"},
2340 y_min = 3,
2341 y_max = 29,
2342 rotation = "random",
2345 -- Grasses and ferns
2346 local grass_forest = {"plains", "taiga", "forest", "flower_forest", "birch_forest", "birch_forest_m", "roofed_forest", "swampland" }
2347 local grass_plains = {"plains", "savanna", "sunflower_plains", "jungle_edge"}
2348 local grass_savanna = {"savanna"}
2350 register_grass_decoration("tallgrass", -0.03, 0.09, grass_forest)
2351 register_grass_decoration("tallgrass", -0.015, 0.075, grass_forest)
2352 register_grass_decoration("tallgrass", 0, 0.06, grass_forest)
2353 register_grass_decoration("tallgrass", 0.015, 0.045, grass_forest)
2354 register_grass_decoration("tallgrass", 0.03, 0.03, grass_forest)
2355 register_grass_decoration("tallgrass", 0.01, 0.05, grass_forest)
2356 register_grass_decoration("tallgrass", 0.03, 0.03, grass_plains)
2357 register_grass_decoration("tallgrass", 0.05, 0.01, grass_plains)
2358 register_grass_decoration("tallgrass", 0.07, -0.01, grass_plains)
2359 register_grass_decoration("tallgrass", 0.09, -0.03, grass_plains)
2360 register_grass_decoration("tallgrass", 0.18, -0.03, grass_savanna)
2362 local fern_minimal = { "jungle", "jungle_edge", "taiga", "mega_taiga", "mega_spruce_taiga", "cold_taiga" }
2363 local fern_low = { "jungle", "jungle_edge", "taiga", "mega_taiga", "mega_spruce_taiga" }
2364 local fern_jungle = { "jungle", "jungle_edge" }
2365 register_grass_decoration("fern", -0.03, 0.09, fern_minimal)
2366 register_grass_decoration("fern", -0.015, 0.075, fern_minimal)
2367 register_grass_decoration("fern", 0, 0.06, fern_minimal)
2368 register_grass_decoration("fern", 0.015, 0.045, fern_low)
2369 register_grass_decoration("fern", 0.03, 0.03, fern_low)
2370 register_grass_decoration("fern", 0.01, 0.05, fern_full)
2371 register_grass_decoration("fern", 0.03, 0.03, fern_full)
2372 register_grass_decoration("fern", 0.05, 0.01, fern_full)
2373 register_grass_decoration("fern", 0.07, -0.01, fern_full)
2374 register_grass_decoration("fern", 0.09, -0.03, fern_full)
2376 -- Tall grass in ice plains
2377 minetest.register_decoration({
2378 deco_type = "schematic",
2379 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt_with_grass_snow"},
2380 sidelen = 16,
2381 noise_params = {
2382 offset = -0.08,
2383 scale = 0.09,
2384 spread = {x = 15, y = 15, z = 15},
2385 seed = 420,
2386 octaves = 3,
2387 persist = 0.6,
2389 biomes = {"ice_plains"},
2390 y_min = 1,
2391 y_max = mcl_vars.mg_overworld_max,
2392 schematic = {
2393 size = { x=1, y=2, z=1 },
2394 data = {
2395 { name = "mcl_core:dirt_with_grass", force_place=true, },
2396 { name = "mcl_flowers:tallgrass", },
2401 -- Dead bushes
2402 minetest.register_decoration({
2403 deco_type = "simple",
2404 place_on = {"group:sand", "mcl_core:podzol", "mcl_core:podzol_snow", "mcl_core:dirt", "mcl_core:coarse_dirt", "group:hardened_clay"},
2405 sidelen = 16,
2406 noise_params = {
2407 offset = 0,
2408 scale = 0.035,
2409 spread = {x = 100, y = 100, z = 100},
2410 seed = 1972,
2411 octaves = 3,
2412 persist = 0.6
2414 y_min = 4,
2415 y_max = mcl_vars.mg_overworld_max,
2416 biomes = {"red_desert", "desert", "mesa", "taiga", "mega_taiga"},
2417 decoration = "mcl_core:deadbush",
2418 height = 1,
2421 -- Mushrooms in mushroom biome
2422 minetest.register_decoration({
2423 deco_type = "simple",
2424 place_on = {"mcl_core:mycelium"},
2425 sidelen = 80,
2426 fill_ratio = 0.009,
2427 biomes = {"mushroom_island", "mushroom_island_shore"},
2428 noise_threshold = 2.0,
2429 y_min = mcl_vars.mg_overworld_min,
2430 y_max = mcl_vars.mg_overworld_max,
2431 decoration = "mcl_mushrooms:mushroom_red",
2433 minetest.register_decoration({
2434 deco_type = "simple",
2435 place_on = {"mcl_core:mycelium"},
2436 sidelen = 80,
2437 fill_ratio = 0.009,
2438 biomes = {"mushroom_island", "mushroom_island_shore"},
2439 y_min = mcl_vars.mg_overworld_min,
2440 y_max = mcl_vars.mg_overworld_max,
2441 decoration = "mcl_mushrooms:mushroom_brown",
2444 -- Mushrooms in taigas
2445 minetest.register_decoration({
2446 deco_type = "simple",
2447 place_on = {"mcl_core:podzol"},
2448 sidelen = 80,
2449 fill_ratio = 0.003,
2450 biomes = {"taiga", "mega_taiga", "mega_spruce_taiga"},
2451 y_min = mcl_vars.mg_overworld_min,
2452 y_max = mcl_vars.mg_overworld_max,
2453 decoration = "mcl_mushrooms:mushroom_red",
2455 minetest.register_decoration({
2456 deco_type = "simple",
2457 place_on = {"mcl_core:podzol"},
2458 sidelen = 80,
2459 fill_ratio = 0.003,
2460 biomes = {"taiga", "mega_taiga", "mega_spruce_taiga"},
2461 y_min = mcl_vars.mg_overworld_min,
2462 y_max = mcl_vars.mg_overworld_max,
2463 decoration = "mcl_mushrooms:mushroom_brown",
2467 -- Mushrooms next to trees
2468 local mushrooms = {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}
2469 local mseeds = { 7133, 8244 }
2470 for m=1, #mushrooms do
2471 -- Mushrooms next to trees
2472 minetest.register_decoration({
2473 deco_type = "simple",
2474 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
2475 sidelen = 16,
2476 noise_params = {
2477 offset = 0,
2478 scale = 0.003,
2479 spread = {x = 250, y = 250, z = 250},
2480 seed = mseeds[m],
2481 octaves = 3,
2482 persist = 0.66,
2484 y_min = 1,
2485 y_max = mcl_vars.mg_overworld_max,
2486 decoration = mushrooms[m],
2487 spawn_by = { "mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree" },
2488 num_spawn_by = 1,
2491 -- More mushrooms in swamplands
2492 minetest.register_decoration({
2493 deco_type = "simple",
2494 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt", "mcl_core:podzol", "mcl_core:mycelium", "mcl_core:stone", "mcl_core:andesite", "mcl_core:diorite", "mcl_core:granite"},
2495 sidelen = 16,
2496 noise_params = {
2497 offset = 0.05,
2498 scale = 0.003,
2499 spread = {x = 250, y = 250, z = 250},
2500 seed = mseeds[m],
2501 octaves = 3,
2502 persist = 0.6,
2504 y_min = 1,
2505 y_max = mcl_vars.mg_overworld_max,
2506 decoration = mushrooms[m],
2507 biomes = { "swampland "},
2508 spawn_by = { "mcl_core:tree", "mcl_core:sprucetree", "mcl_core:darktree", "mcl_core:birchtree" },
2509 num_spawn_by = 1,
2512 local function register_flower(name, biomes, seed, is_in_flower_forest)
2513 if is_in_flower_forest == nil then
2514 is_in_flower_forest = true
2516 if biomes then
2517 minetest.register_decoration({
2518 deco_type = "simple",
2519 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2520 sidelen = 16,
2521 noise_params = {
2522 offset = 0.0008,
2523 scale = 0.006,
2524 spread = {x = 100, y = 100, z = 100},
2525 seed = seed,
2526 octaves = 3,
2527 persist = 0.6
2529 y_min = 1,
2530 y_max = mcl_vars.mg_overworld_max,
2531 biomes = biomes,
2532 decoration = "mcl_flowers:"..name,
2535 if is_in_flower_forest then
2536 minetest.register_decoration({
2537 deco_type = "simple",
2538 place_on = {"mcl_core:dirt_with_grass", "mcl_core:dirt"},
2539 sidelen = 80,
2540 noise_params= {
2541 offset = 0.0008*40,
2542 scale = 0.003,
2543 spread = {x = 100, y = 100, z = 100},
2544 seed = seed,
2545 octaves = 3,
2546 persist = 0.6,
2548 y_min = 1,
2549 y_max = mcl_vars.mg_overworld_max,
2550 biomes = {"flower_forest"},
2551 decoration = "mcl_flowers:"..name,
2556 local flower_biomes1 = {"plains", "sunflower_plains", "roofed_forest", "forest", "birch_forest", "birch_forest_m", "taiga", "cold_taiga", "jungle", "jungle_edge", "savanna" }
2558 register_flower("dandelion", flower_biomes1, 8)
2559 register_flower("poppy", flower_biomes1, 9439)
2561 local flower_biomes2 = {"plains", "sunflower_plains"}
2562 register_flower("tulip_red", flower_biomes2, 436)
2563 register_flower("tulip_orange", flower_biomes2, 536)
2564 register_flower("tulip_pink", flower_biomes2, 636)
2565 register_flower("tulip_white", flower_biomes2, 736)
2566 register_flower("azure_bluet", flower_biomes2, 800)
2567 register_flower("oxeye_daisy", flower_biomes2, 3490)
2569 register_flower("allium", nil, 0) -- flower forest only
2570 register_flower("blue_orchid", {"swampland"}, 64500, false)
2575 -- Decorations in non-Overworld dimensions
2576 local function register_dimension_decorations()
2577 -- TODO
2581 -- Detect mapgen to select functions
2583 if mg_name ~= "singlenode" then
2584 minetest.clear_registered_biomes()
2585 minetest.clear_registered_decorations()
2586 minetest.clear_registered_schematics()
2587 if mg_name ~= "v6" and mg_name ~= "flat" then
2588 register_biomes()
2589 register_biomelike_ores()
2590 register_decorations()
2591 elseif mg_name == "flat" then
2592 -- Implementation of Minecraft's Superflat mapgen, classic style
2593 minetest.clear_registered_biomes()
2594 minetest.clear_registered_decorations()
2595 minetest.clear_registered_schematics()
2596 register_classic_superflat_biome()
2599 -- Non-overworld stuff is registered independently
2600 register_dimension_biomes()
2601 register_dimension_ores()
2602 register_dimension_decorations()
2604 -- Overworld decorations for v6 are handled in mcl_mapgen_core