Add sand beach to Birch Forest
[Pixture/pixture_revival.git] / mods / rp_default / mapgen.lua
blobdc4fc49e829a927f67223d24b07fad5c75f202b2
2 --
3 -- Mapgen
4 --
6 -- Uncomment this to cut a big portion of ground out for visualizing ore spawning
8 --[[
9 local function on_generated(minp, maxp, blockseed)
10 for x = minp.x, maxp.x do
11 if x > 0 then
12 return
13 end
15 for z = minp.z, maxp.z do
16 if z > -16 and z < 16 then
17 for y = minp.y, maxp.y do
18 minetest.remove_node({x = x, y = y, z = z})
19 end
20 end
21 end
22 end
23 end
25 minetest.register_on_generated(on_generated)
26 --]]
28 -- Aliases for map generator outputs
30 minetest.register_alias("mapgen_stone", "rp_default:stone")
31 minetest.register_alias("mapgen_desert_stone", "rp_default:sandstone")
32 minetest.register_alias("mapgen_desert_sand", "rp_default:sand")
33 minetest.register_alias("mapgen_sandstone", "rp_default:sandstone")
34 minetest.register_alias("mapgen_sandstonebrick", "rp_default:compressed_sandstone")
35 minetest.register_alias("mapgen_cobble", "rp_default:cobble")
36 minetest.register_alias("mapgen_gravel", "rp_default:gravel")
37 minetest.register_alias("mapgen_mossycobble", "rp_default:cobble")
38 minetest.register_alias("mapgen_dirt", "rp_default:dirt")
39 minetest.register_alias("mapgen_dirt_with_grass", "rp_default:dirt_with_grass")
40 minetest.register_alias("mapgen_sand", "rp_default:sand")
41 minetest.register_alias("mapgen_snow", "air")
42 minetest.register_alias("mapgen_snowblock", "rp_default:dirt_with_grass")
43 minetest.register_alias("mapgen_dirt_with_snow", "rp_default:dirt_with_grass")
44 minetest.register_alias("mapgen_ice", "rp_default:water_source")
45 minetest.register_alias("mapgen_tree", "rp_default:tree")
46 minetest.register_alias("mapgen_leaves", "rp_default:leaves")
47 minetest.register_alias("mapgen_apple", "rp_default:apple")
48 minetest.register_alias("mapgen_jungletree", "rp_default:tree_birch")
49 minetest.register_alias("mapgen_jungleleaves", "rp_default:leaves_birch")
50 minetest.register_alias("mapgen_junglegrass", "rp_default:tall_grass")
51 minetest.register_alias("mapgen_pine_tree", "rp_default:tree_oak")
52 minetest.register_alias("mapgen_pine_needles", "rp_default:leaves_oak")
54 minetest.register_alias("mapgen_water_source", "rp_default:water_source")
55 minetest.register_alias("mapgen_river_water_source", "rp_default:river_water_source")
57 minetest.register_alias("mapgen_lava_source", "rp_default:water_source")
59 --[[ BIOMES ]]
61 minetest.clear_registered_biomes()
63 local mg_name = minetest.get_mapgen_setting("mg_name")
65 local UNDERGROUND_Y_MAX = -200
66 local ORCHARD_Y_MIN = 20
67 local SWAMP_Y_MAX = 7
69 local register_ocean_and_beach = function(biomename, node_ocean, beach_depth, node_beach)
70 local orig_biome = minetest.registered_biomes[biomename]
71 if not orig_biome then
72 return
73 end
74 local newdef = table.copy(orig_biome)
75 newdef.name = biomename .. " Ocean"
76 newdef.node_top = node_ocean or "rp_default:sand"
77 newdef.node_filler = newdef.node_top
78 newdef.y_min = UNDERGROUND_Y_MAX + 1
80 if beach_depth and beach_depth > 0 then
81 newdef.y_max = orig_biome.y_min - beach_depth - 1
82 else
83 newdef.y_max = orig_biome.y_min - 1
84 end
85 minetest.register_biome(newdef)
87 if beach_depth and beach_depth > 0 then
89 local newdef2 = table.copy(orig_biome)
90 newdef2.name = biomename .. " Beach"
91 newdef2.node_top = node_beach or "rp_default:sand"
92 newdef2.node_filler = newdef2.node_top
93 newdef2.y_min = orig_biome.y_min - beach_depth
94 newdef2.y_max = orig_biome.y_min - 1
95 minetest.register_biome(newdef2)
96 end
97 end
99 if mg_name ~= "v6" then
101 minetest.register_biome(
103 name = "Marsh",
105 node_top = "rp_default:dirt_with_grass",
106 node_filler = "rp_default:dirt",
107 node_cave_liquid = "rp_default:swamp_water_source",
108 node_riverbed = "rp_default:dirt",
110 depth_filler = 0,
111 depth_top = 1,
112 depth_riverbed = 1,
114 y_min = 2,
115 y_max = SWAMP_Y_MAX,
117 heat_point = 91,
118 humidity_point = 96,
120 register_ocean_and_beach("Marsh", "rp_default:dirt", 2, "rp_default:sand")
121 default.set_biome_info("Marsh", "grassy")
123 -- This special biome has the giant birch trees and is
124 -- limited to a very specific height.
125 -- It has no equivalent biome above or below.
126 minetest.register_biome(
128 name = "Deep Forest",
130 node_top = "rp_default:dirt_with_grass",
131 node_filler = "rp_default:dirt",
132 node_riverbed = "rp_default:sand",
134 depth_filler = 6,
135 depth_top = 1,
136 depth_riverbed = 3,
138 y_min = 30,
139 y_max = 40,
141 heat_point = 49,
142 humidity_point = 33,
144 default.set_biome_info("Deep Forest", "grassy")
146 minetest.register_biome(
148 name = "Forest",
150 node_top = "rp_default:dirt_with_grass",
151 node_filler = "rp_default:dirt",
152 node_riverbed = "rp_default:sand",
154 depth_filler = 6,
155 depth_top = 1,
156 depth_riverbed = 2,
158 y_min = 2,
159 y_max = 200,
161 heat_point = 48,
162 humidity_point = 34,
164 register_ocean_and_beach("Forest", "rp_default:sand")
165 default.set_biome_info("Forest", "grassy")
167 minetest.register_biome(
169 name = "Grove",
171 node_top = "rp_default:dirt_with_grass",
172 node_filler = "rp_default:dirt",
173 node_riverbed = "rp_default:sand",
175 depth_filler = 4,
176 depth_top = 1,
177 depth_riverbed = 4,
179 y_min = 3,
180 y_max = 32000,
182 heat_point = 45,
183 humidity_point = 19,
185 register_ocean_and_beach("Grove", "rp_default:sand")
186 default.set_biome_info("Grove", "grassy")
188 minetest.register_biome(
190 name = "Wilderness",
192 node_top = "rp_default:dirt_with_grass",
193 node_filler = "rp_default:dirt",
194 node_riverbed = "rp_default:sand",
196 depth_filler = 6,
197 depth_top = 1,
198 depth_riverbed = 2,
200 y_min = 3,
201 y_max = 32000,
203 heat_point = 76,
204 humidity_point = 30,
206 register_ocean_and_beach("Wilderness", "rp_default:sand")
207 default.set_biome_info("Wilderness", "grassy")
209 -- Note: Grassland is below Orchard
210 minetest.register_biome(
212 name = "Grassland",
214 node_top = "rp_default:dirt_with_grass",
215 node_filler = "rp_default:dirt",
216 node_riverbed = "rp_default:sand",
218 depth_filler = 4,
219 depth_top = 1,
220 depth_riverbed = 2,
222 y_min = 3,
223 y_max = ORCHARD_Y_MIN - 1,
225 heat_point = 71,
226 humidity_point = 52,
228 register_ocean_and_beach("Grassland", "rp_default:sand")
229 default.set_biome_info("Grassland", "grassy")
231 -- Note: Orchard is the 'highland' version of Grassland
232 minetest.register_biome(
234 name = "Orchard",
236 node_top = "rp_default:dirt_with_grass",
237 node_filler = "rp_default:dirt",
238 node_riverbed = "rp_default:sand",
240 depth_filler = 4,
241 depth_top = 1,
242 depth_riverbed = 2,
244 y_min = ORCHARD_Y_MIN,
245 y_max = 32000,
247 heat_point = 71,
248 humidity_point = 52,
250 default.set_biome_info("Orchard", "grassy")
252 -- Note: Shrubbery is below Chaparral
253 minetest.register_biome(
255 name = "Shrubbery",
257 node_top = "rp_default:dirt_with_grass",
258 node_filler = "rp_default:dirt",
259 node_riverbed = "rp_default:sand",
261 depth_filler = 3,
262 depth_top = 1,
263 depth_riverbed = 2,
265 y_min = 2,
266 y_max = 55,
268 heat_point = 107,
269 humidity_point = 45,
271 register_ocean_and_beach("Shrubbery", "rp_default:sand")
272 default.set_biome_info("Shrubbery", "grassy")
274 -- Note: High biome. This is the highland version of Shrubbery
275 minetest.register_biome(
277 name = "Chaparral",
279 node_top = "rp_default:dirt_with_dry_grass",
280 node_filler = "rp_default:dry_dirt",
281 node_riverbed = "rp_default:sand",
283 depth_filler = 0,
284 depth_top = 1,
285 depth_riverbed = 4,
287 y_min = 56,
288 y_max = 32000,
290 heat_point = 107,
291 humidity_point = 45,
293 default.set_biome_info("Chaparral", "savannic")
295 minetest.register_biome(
297 name = "Savanna",
299 node_top = "rp_default:dirt_with_dry_grass",
300 node_filler = "rp_default:dry_dirt",
301 node_riverbed = "rp_default:gravel",
303 depth_filler = 2,
304 depth_top = 1,
305 depth_riverbed = 3,
307 y_min = 2,
308 y_max = 55,
310 heat_point = 101,
311 humidity_point = 25,
313 register_ocean_and_beach("Savanna", "rp_default:sand")
314 default.set_biome_info("Savanna", "savannic")
316 minetest.register_biome(
318 name = "Desert",
320 node_top = "rp_default:sand",
321 node_filler = "rp_default:sandstone",
322 node_riverbed = "rp_default:sand",
323 node_dungeon = "rp_default:sandstone",
325 depth_filler = 8,
326 depth_top = 3,
327 depth_riverbed = 6,
329 y_min = 1,
330 y_max = 32000,
332 heat_point = 112,
333 humidity_point = 32,
335 register_ocean_and_beach("Desert", "rp_default:sand")
336 default.set_biome_info("Desert", "desertic")
338 minetest.register_biome(
340 name = "Wasteland",
342 node_top = "rp_default:dry_dirt",
343 node_filler = "rp_default:sandstone",
344 node_riverbed = "rp_default:sandstone",
346 depth_filler = 3,
347 depth_top = 1,
348 depth_riverbed = 2,
350 y_min = 2,
351 y_max = 32000,
353 heat_point = 95,
354 humidity_point = 0,
356 register_ocean_and_beach("Wasteland", "rp_default:dry_dirt", 5, "rp_default:gravel")
357 default.set_biome_info("Wasteland", "drylandic")
359 minetest.register_biome(
361 name = "Rocky Dryland",
363 node_top = "rp_default:dry_dirt",
364 node_filler = "rp_default:dry_dirt",
365 node_riverbed = "rp_default:gravel",
367 depth_filler = 0,
368 depth_top = 1,
369 depth_riverbed = 4,
371 y_min = 3,
372 y_max = 32000,
374 heat_point = 79,
375 humidity_point = 1,
377 register_ocean_and_beach("Rocky Dryland", "rp_default:gravel")
378 default.set_biome_info("Rocky Dryland", "drylandic")
380 minetest.register_biome(
382 name = "Wooded Dryland",
384 node_top = "rp_default:dry_dirt",
385 node_filler = "rp_default:dry_dirt",
386 node_riverbed = "rp_default:gravel",
388 depth_filler = 4,
389 depth_top = 1,
390 depth_riverbed = 2,
392 y_min = 1,
393 y_max = 32000,
395 heat_point = 78,
396 humidity_point = 9,
398 register_ocean_and_beach("Wooded Dryland", "rp_default:dry_dirt")
399 default.set_biome_info("Wooded Dryland", "drylandic")
401 minetest.register_biome(
403 name = "Savannic Wasteland",
405 node_top = "rp_default:dry_dirt",
406 node_filler = "rp_default:sandstone",
407 node_riverbed = "rp_default:gravel",
409 depth_filler = 2,
410 depth_top = 1,
411 depth_riverbed = 2,
413 y_min = 2,
414 y_max = 32000,
416 heat_point = 94,
417 humidity_point = 14,
419 register_ocean_and_beach("Savannic Wasteland", "rp_default:sand")
420 default.set_biome_info("Savannic Wasteland", "savannic")
422 minetest.register_biome(
424 name = "Thorny Shrubs",
426 node_top = "rp_default:dirt_with_grass",
427 node_filler = "rp_default:dirt",
428 node_riverbed = "rp_default:gravel",
430 depth_filler = 4,
431 depth_top = 1,
432 depth_riverbed = 2,
434 y_min = 2,
435 y_max = 200,
437 heat_point = 76,
438 humidity_point = 15,
440 register_ocean_and_beach("Thorny Shrubs", "rp_default:sand")
441 default.set_biome_info("Thorny Shrubs", "grassy")
443 minetest.register_biome(
445 name = "Mystery Forest",
447 node_top = "rp_default:dirt_with_grass",
448 node_filler = "rp_default:dirt",
449 node_riverbed = "rp_default:gravel",
451 depth_filler = 4,
452 depth_top = 1,
453 depth_riverbed = 2,
455 y_min = 1,
456 y_max = 200,
458 heat_point = 18,
459 humidity_point = 2,
461 register_ocean_and_beach("Mystery Forest", "rp_default:dirt")
462 default.set_biome_info("Mystery Forest", "grassy")
464 minetest.register_biome(
466 name = "Poplar Plains",
468 node_top = "rp_default:dirt_with_grass",
469 node_filler = "rp_default:dirt",
470 node_riverbed = "rp_default:sand",
472 depth_filler = 4,
473 depth_top = 1,
474 depth_riverbed = 2,
476 y_min = 1,
477 y_max = 32000,
479 heat_point = 47,
480 humidity_point = 0,
482 register_ocean_and_beach("Poplar Plains", "rp_default:dirt")
483 default.set_biome_info("Poplar Plains", "grassy")
485 minetest.register_biome(
487 name = "Baby Poplar Plains",
489 node_top = "rp_default:dirt_with_grass",
490 node_filler = "rp_default:dirt",
491 node_riverbed = "rp_default:sand",
493 depth_filler = 4,
494 depth_top = 1,
495 depth_riverbed = 2,
497 y_min = 2,
498 y_max = 32000,
500 heat_point = 58,
501 humidity_point = 9,
503 register_ocean_and_beach("Baby Poplar Plains", "rp_default:sand")
504 default.set_biome_info("Baby Poplar Plains", "grassy")
506 minetest.register_biome(
508 name = "Tall Birch Forest",
510 node_top = "rp_default:dirt_with_grass",
511 node_filler = "rp_default:dirt",
512 node_riverbed = "rp_default:sand",
514 depth_filler = 3,
515 depth_top = 1,
516 depth_riverbed = 2,
518 y_min = 2,
519 y_max = 32000,
521 heat_point = 6,
522 humidity_point = 14,
524 register_ocean_and_beach("Tall Birch Forest", "rp_default:sand")
525 default.set_biome_info("Tall Birch Forest", "grassy")
527 minetest.register_biome(
529 name = "Birch Forest",
531 node_top = "rp_default:dirt_with_grass",
532 node_filler = "rp_default:dirt",
533 node_riverbed = "rp_default:sand",
535 depth_filler = 3,
536 depth_top = 1,
537 depth_riverbed = 2,
539 y_min = 2,
540 y_max = 32000,
542 heat_point = 18,
543 humidity_point = 15,
545 register_ocean_and_beach("Birch Forest", "rp_default:sand")
546 default.set_biome_info("Birch Forest", "grassy")
548 minetest.register_biome(
550 name = "Oak Shrubbery",
552 node_top = "rp_default:dirt_with_grass",
553 node_filler = "rp_default:dirt",
554 node_riverbed = "rp_default:gravel",
556 depth_filler = 3,
557 depth_top = 1,
558 depth_riverbed = 1,
560 y_min = 1,
561 y_max = 32000,
563 heat_point = 37,
564 humidity_point = 55,
566 register_ocean_and_beach("Oak Shrubbery", "rp_default:dirt")
567 default.set_biome_info("Oak Shrubbery", "grassy")
569 minetest.register_biome(
571 name = "Oak Forest",
573 node_top = "rp_default:dirt_with_grass",
574 node_filler = "rp_default:dirt",
575 node_riverbed = "rp_default:gravel",
577 depth_filler = 5,
578 depth_top = 1,
579 depth_riverbed = 1,
581 y_min = 1,
582 y_max = 32000,
584 heat_point = 22,
585 humidity_point = 52,
587 register_ocean_and_beach("Oak Forest", "rp_default:sand")
588 default.set_biome_info("Oak Forest", "grassy")
590 minetest.register_biome(
592 name = "Tall Oak Forest",
594 node_top = "rp_default:dirt_with_grass",
595 node_filler = "rp_default:dirt",
596 node_riverbed = "rp_default:gravel",
598 depth_filler = 6,
599 depth_top = 1,
600 depth_riverbed = 2,
602 y_min = 1,
603 y_max = 32000,
605 heat_point = 10,
606 humidity_point = 43,
608 register_ocean_and_beach("Tall Oak Forest", "rp_default:sand")
609 default.set_biome_info("Tall Oak Forest", "grassy")
611 minetest.register_biome(
613 name = "Dense Oak Forest",
615 node_top = "rp_default:dirt_with_grass",
616 node_filler = "rp_default:dirt",
617 node_riverbed = "rp_default:gravel",
619 depth_filler = 7,
620 depth_top = 1,
621 depth_riverbed = 3,
623 y_min = 1,
624 y_max = 32000,
626 heat_point = 0,
627 humidity_point = 43,
629 register_ocean_and_beach("Dense Oak Forest", "rp_default:sand")
630 default.set_biome_info("Dense Oak Forest", "grassy")
632 -- Equivalent to Pixture's original 'Swamp' biome
633 minetest.register_biome(
635 name = "Swamp Meadow",
637 node_top = "rp_default:dirt_with_swamp_grass",
638 node_filler = "rp_default:swamp_dirt",
639 node_cave_liquid = "rp_default:swamp_water_source",
640 node_riverbed = "rp_default:swamp_dirt",
642 depth_filler = 7,
643 depth_top = 1,
644 depth_riverbed = 4,
646 y_min = 1,
647 y_max = SWAMP_Y_MAX,
649 heat_point = 62,
650 humidity_point = 93,
652 register_ocean_and_beach("Swamp Meadow", "rp_default:dirt", 5, "rp_default:swamp_dirt")
653 default.set_biome_info("Swamp Meadow", "swampy")
655 minetest.register_biome(
657 name = "Mixed Swamp",
659 node_top = "rp_default:dirt_with_swamp_grass",
660 node_filler = "rp_default:swamp_dirt",
661 node_cave_liquid = "rp_default:swamp_water_source",
662 node_riverbed = "rp_default:swamp_dirt",
664 depth_filler = 7,
665 depth_top = 1,
666 depth_riverbed = 3,
668 y_min = 1,
669 y_max = SWAMP_Y_MAX,
671 heat_point = 36,
672 humidity_point = 87,
674 register_ocean_and_beach("Mixed Swamp", "rp_default:dirt", 5, "rp_default:swamp_dirt")
675 default.set_biome_info("Mixed Swamp", "swamp")
677 minetest.register_biome(
679 name = "Swamp Forest",
681 node_top = "rp_default:dirt_with_swamp_grass",
682 node_filler = "rp_default:swamp_dirt",
683 node_cave_liquid = "rp_default:swamp_water_source",
684 node_riverbed = "rp_default:swamp_dirt",
686 depth_filler = 5,
687 depth_top = 1,
688 depth_riverbed = 4,
690 y_min = 1,
691 y_max = SWAMP_Y_MAX,
693 heat_point = 12,
694 humidity_point = 83,
696 register_ocean_and_beach("Swamp Forest", "rp_default:dirt", 5, "rp_default:swamp_dirt")
697 default.set_biome_info("Swamp Forest", "swampy")
699 minetest.register_biome(
701 name = "Dry Swamp",
703 node_top = "rp_default:dirt_with_swamp_grass",
704 node_filler = "rp_default:swamp_dirt",
705 node_riverbed = "rp_default:swamp_dirt",
707 depth_filler = 6,
708 depth_top = 1,
709 depth_riverbed = 2,
711 y_min = 1,
712 y_max = SWAMP_Y_MAX,
714 heat_point = 0,
715 humidity_point = 67,
717 register_ocean_and_beach("Dry Swamp", "rp_default:dirt", 5, "rp_default:dirt") -- force creation of beach sub-biome
718 default.set_biome_info("Dry Swamp", "swampy")
720 minetest.register_biome(
722 name = "Papyrus Swamp",
724 node_top = "rp_default:dirt_with_swamp_grass",
725 node_filler = "rp_default:swamp_dirt",
726 node_cave_liquid = "rp_default:swamp_water_source",
727 node_riverbed = "rp_default:swamp_dirt",
729 depth_filler = 4,
730 depth_top = 1,
731 depth_riverbed = 3,
733 y_min = 2,
734 y_max = SWAMP_Y_MAX,
736 heat_point = 49,
737 humidity_point = 89,
739 register_ocean_and_beach("Papyrus Swamp", "rp_default:swamp_dirt", 2, "rp_default:sand")
740 default.set_biome_info("Papyrus Swamp", "swampy")
742 -- Special Underground biome
743 minetest.register_biome(
745 name = "Underground",
747 y_min = -31000,
748 y_max = UNDERGROUND_Y_MAX,
750 heat_point = 50,
751 humidity_point = 50,
753 default.set_biome_info("Underground", "undergroundy")
757 local function spring_ore_np(seed)
758 return {
759 offset = 0,
760 scale = 1,
761 spread = {x=250, y=250, z=250},
762 seed = seed or 12345,
763 octaves = 3,
764 persist = 0.6,
765 lacunarity = 2,
766 flags = "defaults",
770 -- Water
772 minetest.register_ore( -- Springs
774 ore_type = "blob",
775 ore = "rp_default:water_source",
776 wherein = "rp_default:dirt_with_grass",
777 biomes = {"Grassland"},
778 clust_scarcity = 26*26*26,
779 clust_num_ores = 1,
780 clust_size = 1,
781 y_min = 20,
782 y_max = 31000,
783 noise_params = spring_ore_np(),
786 minetest.register_ore( -- Pools
788 ore_type = "blob",
789 ore = "rp_default:water_source",
790 wherein = "rp_default:dirt_with_grass",
791 biomes = {"Wilderness"},
792 clust_scarcity = 32*32*32,
793 clust_num_ores = 20,
794 clust_size = 6,
795 y_min = 10,
796 y_max = 30,
797 noise_params = spring_ore_np(),
799 if mg_name ~= "v6" then
800 minetest.register_ore( -- Swamp (big springs)
802 ore_type = "blob",
803 ore = "rp_default:swamp_water_source",
804 wherein = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
805 biomes = {"Mixed Swamp", "Papyrus Swamp", "Swamp Forest", "Swamp Meadow"},
806 clust_scarcity = 7*7*7,
807 clust_num_ores = 10,
808 clust_size = 4,
809 y_min = -31000,
810 y_max = 31000,
811 noise_params = spring_ore_np(13943),
813 minetest.register_ore( -- Swamp (medium springs)
815 ore_type = "blob",
816 ore = "rp_default:swamp_water_source",
817 wherein = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
818 biomes = {"Mixed Swamp", "Papyrus Swamp", "Swamp Forest", "Swamp Meadow"},
819 clust_scarcity = 5*5*5,
820 clust_num_ores = 8,
821 clust_size = 2,
822 y_min = -31000,
823 y_max = 31000,
824 noise_params = spring_ore_np(49494),
827 minetest.register_ore( -- Swamp (small springs)
829 ore_type = "blob",
830 ore = "rp_default:swamp_water_source",
831 wherein = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
832 biomes = {"Mixed Swamp", "Papyrus Swamp", "Swamp Forest", "Swamp Meadow"},
833 clust_scarcity = 6*6*6,
834 clust_num_ores = 1,
835 clust_size = 1,
836 y_min = -31000,
837 y_max = 31000,
838 noise_params = spring_ore_np(59330),
841 minetest.register_ore( -- Marsh
843 ore_type = "blob",
844 ore = "rp_default:swamp_water_source",
845 wherein = {"rp_default:dirt_with_grass", "rp_default:dirt"},
846 biomes = {"Marsh"},
847 clust_scarcity = 8*8*8,
848 clust_num_ores = 10,
849 clust_size = 6,
850 y_min = -31000,
851 y_max = 31000,
852 noise_params = spring_ore_np(),
855 minetest.register_ore(
857 ore_type = "blob",
858 ore = "rp_default:gravel",
859 wherein = "rp_default:dry_dirt",
860 biomes = {"Rocky Dryland"},
861 clust_scarcity = 8*8*8,
862 clust_size = 8,
863 y_min = -31000,
864 y_max = 31000,
865 noise_params = {
866 octaves = 1,
867 scale = 1,
868 offset = 0,
869 spread = { x = 100, y = 100, z = 100 },
870 lacunarity = 2.0,
871 persistence = 0.5,
872 seed = 43400,
875 minetest.register_ore(
877 ore_type = "blob",
878 ore = "rp_default:stone",
879 wherein = "rp_default:dry_dirt",
880 biomes = {"Rocky Dryland"},
881 clust_scarcity = 8*8*8,
882 clust_size = 7,
883 y_min = -31000,
884 y_max = 31000,
885 noise_params = {
886 octaves = 1,
887 scale = 1,
888 offset = 0,
889 spread = { x = 100, y = 100, z = 100 },
890 lacunarity = 2.0,
891 persistence = 0.5,
892 seed = 13940,
896 minetest.register_ore( -- Dry Swamp (dirt)
898 ore_type = "blob",
899 ore = "rp_default:dirt_with_grass",
900 wherein = {"rp_default:dirt_with_swamp_grass"},
901 biomes = {"Dry Swamp"},
902 clust_scarcity = 3*3*3,
903 clust_num_ores = 10,
904 clust_size = 4,
905 y_min = -31000,
906 y_max = 31000,
907 noise_params = spring_ore_np(13943),
909 minetest.register_ore( -- Dry Swamp (dirt)
911 ore_type = "blob",
912 ore = "rp_default:dirt",
913 wherein = {"rp_default:swamp_dirt"},
914 biomes = {"Dry Swamp"},
915 clust_scarcity = 3*3*3,
916 clust_num_ores = 10,
917 clust_size = 4,
918 y_min = -31000,
919 y_max = 31000,
920 noise_params = spring_ore_np(13943),
922 minetest.register_ore(
924 ore_type = "scatter",
925 ore = "rp_default:dirt_with_dry_grass",
926 wherein = "rp_default:dry_dirt",
927 biomes = {"Savannic Wasteland"},
928 clust_scarcity = 6*6*6,
929 clust_size = 6,
930 clust_num_ores = 40,
931 y_min = 2,
932 y_max = 31000,
933 noise_params = {
934 octaves = 1,
935 scale = 1,
936 offset = 0.1,
937 spread = { x = 100, y = 100, z = 100 },
938 lacunarity = 2.0,
939 persistence = 0.5,
940 seed = 12449,
944 minetest.register_ore(
946 ore_type = "blob",
947 ore = "rp_default:dirt_with_dry_grass",
948 wherein = "rp_default:dry_dirt",
949 biomes = {"Savannic Wasteland"},
950 clust_scarcity = 7*7*7,
951 clust_size = 4,
952 y_min = 2,
953 y_max = 31000,
954 noise_params = {
955 octaves = 2,
956 scale = 1,
957 offset = 0.2,
958 spread = { x = 100, y = 100, z = 100 },
959 lacunarity = 2.0,
960 persistence = 0.5,
961 seed = 12450,
965 minetest.register_ore(
967 ore_type = "scatter",
968 ore = "rp_default:stone_with_sulfur",
969 wherein = "rp_default:stone",
970 biomes = { "Rocky Dryland", "Wooded Dryland"},
971 clust_scarcity = 9*9*9,
972 clust_num_ores = 1,
973 clust_size = 1,
974 y_min = -8,
975 y_max = 32,
982 --[[ DECORATIONS ]]
983 -- The decorations are roughly ordered by size;
984 -- largest decorations first.
986 -- Tree decorations
988 if mg_name ~= "v6" then
989 minetest.register_decoration(
991 name = "rp_default:giga_birch_tree",
992 deco_type = "schematic",
993 place_on = {"rp_default:dirt_with_grass"},
994 sidelen = 16,
995 fill_ratio = 0.023,
996 biomes = {"Deep Forest"},
997 flags = "place_center_x, place_center_z",
998 schematic = minetest.get_modpath("rp_default")
999 .. "/schematics/rp_default_giga_birch_tree.mts",
1000 rotation = "random",
1001 y_min = -32000,
1002 y_max = 32000,
1005 minetest.register_decoration(
1007 deco_type = "schematic",
1008 place_on = {"rp_default:dirt_with_grass"},
1009 sidelen = 16,
1010 fill_ratio = 0.004,
1011 biomes = {"Grove"},
1012 flags = "place_center_x, place_center_z",
1013 schematic = minetest.get_modpath("rp_default")
1014 .. "/schematics/rp_default_tall_grove_tree.mts",
1015 y_min = 0,
1016 y_max = 32000,
1019 minetest.register_decoration(
1021 deco_type = "schematic",
1022 place_on = {"rp_default:dirt_with_grass"},
1023 sidelen = 16,
1024 fill_ratio = 0.008,
1025 biomes = {"Forest"},
1026 flags = "place_center_x, place_center_z",
1027 schematic = minetest.get_modpath("rp_default")
1028 .. "/schematics/rp_default_coniferlike_tree.mts",
1029 y_min = -32000,
1030 y_max = 32000,
1033 minetest.register_decoration(
1035 deco_type = "schematic",
1036 place_on = {"rp_default:dirt_with_grass"},
1037 sidelen = 16,
1038 fill_ratio = 0.015,
1039 biomes = {"Tall Birch Forest"},
1040 flags = "place_center_x, place_center_z",
1041 schematic = minetest.get_modpath("rp_default")
1042 .. "/schematics/rp_default_birch_cuboid_tall.mts",
1043 y_min = -32000,
1044 y_max = 32000,
1047 minetest.register_decoration(
1049 deco_type = "schematic",
1050 place_on = {"rp_default:dirt_with_grass"},
1051 sidelen = 16,
1052 fill_ratio = 0.004,
1053 biomes = {"Forest"},
1054 flags = "place_center_x, place_center_z",
1055 schematic = minetest.get_modpath("rp_default")
1056 .. "/schematics/rp_default_birch_cuboid_3x3_short.mts",
1057 y_min = -32000,
1058 y_max = 32000,
1061 minetest.register_decoration(
1063 deco_type = "schematic",
1064 place_on = {"rp_default:dirt_with_grass"},
1065 sidelen = 16,
1066 fill_ratio = 0.0003,
1067 biomes = {"Birch Forest"},
1068 flags = "place_center_x, place_center_z",
1069 schematic = minetest.get_modpath("rp_default")
1070 .. "/schematics/rp_default_birch_cuboid_5x4.mts",
1071 y_min = -32000,
1072 y_max = 32000,
1074 minetest.register_decoration(
1076 deco_type = "schematic",
1077 place_on = {"rp_default:dirt_with_grass"},
1078 sidelen = 16,
1079 fill_ratio = 0.001,
1080 biomes = {"Birch Forest"},
1081 flags = "place_center_x, place_center_z",
1082 schematic = minetest.get_modpath("rp_default")
1083 .. "/schematics/rp_default_birch_cuboid_3x4.mts",
1084 y_min = -32000,
1085 y_max = 32000,
1087 minetest.register_decoration(
1089 deco_type = "schematic",
1090 place_on = {"rp_default:dirt_with_grass"},
1091 sidelen = 16,
1092 fill_ratio = 0.003,
1093 biomes = {"Birch Forest"},
1094 flags = "place_center_x, place_center_z",
1095 schematic = minetest.get_modpath("rp_default")
1096 .. "/schematics/rp_default_birch_cuboid_3x3_long.mts",
1097 y_min = -32000,
1098 y_max = 32000,
1100 minetest.register_decoration(
1102 deco_type = "schematic",
1103 place_on = {"rp_default:dirt_with_grass"},
1104 sidelen = 16,
1105 fill_ratio = 0.001,
1106 biomes = {"Birch Forest"},
1107 flags = "place_center_x, place_center_z",
1108 schematic = minetest.get_modpath("rp_default")
1109 .. "/schematics/rp_default_birch_cuboid_3x3_short.mts",
1110 y_min = -32000,
1111 y_max = 32000,
1113 minetest.register_decoration(
1115 deco_type = "schematic",
1116 place_on = {"rp_default:dirt_with_grass"},
1117 sidelen = 16,
1118 fill_ratio = 0.0001,
1119 biomes = {"Birch Forest"},
1120 flags = "place_center_x, place_center_z",
1121 schematic = minetest.get_modpath("rp_default")
1122 .. "/schematics/rp_default_birch_plus.mts",
1123 y_min = -32000,
1124 y_max = 32000,
1126 minetest.register_decoration(
1128 deco_type = "schematic",
1129 place_on = {"rp_default:dirt_with_grass"},
1130 sidelen = 16,
1131 fill_ratio = 0.0002,
1132 biomes = {"Birch Forest"},
1133 flags = "place_center_x, place_center_z",
1134 schematic = minetest.get_modpath("rp_default")
1135 .. "/schematics/rp_default_apple_tree_empty.mts",
1136 y_min = -32000,
1137 y_max = 32000,
1142 minetest.register_decoration(
1144 deco_type = "schematic",
1145 place_on = {"rp_default:dirt_with_grass"},
1146 sidelen = 16,
1147 fill_ratio = 0.004,
1148 biomes = {"Dry Swamp"},
1149 flags = "place_center_x, place_center_z",
1150 schematic = minetest.get_modpath("rp_default")
1151 .. "/schematics/rp_default_birch_cuboid_3x3_short.mts",
1152 y_min = -32000,
1153 y_max = 32000,
1156 minetest.register_decoration(
1158 deco_type = "schematic",
1159 place_on = {"rp_default:dirt_with_grass"},
1160 sidelen = 16,
1161 fill_ratio = 0.00035,
1162 biomes = {"Orchard"},
1163 flags = "place_center_x, place_center_z",
1164 schematic = minetest.get_modpath("rp_default")
1165 .. "/schematics/rp_default_apple_tree_big.mts",
1166 y_min = 15,
1167 y_max = 32000,
1170 minetest.register_decoration(
1172 deco_type = "schematic",
1173 place_on = {"rp_default:dirt_with_grass"},
1174 sidelen = 16,
1175 fill_ratio = 0.007,
1176 biomes = {"Orchard"},
1177 flags = "place_center_x, place_center_z",
1178 schematic = minetest.get_modpath("rp_default")
1179 .. "/schematics/rp_default_apple_tree.mts",
1180 y_min = 10,
1181 y_max = 32000,
1184 minetest.register_decoration(
1186 deco_type = "schematic",
1187 place_on = {"rp_default:dirt_with_grass"},
1188 sidelen = 16,
1189 fill_ratio = 0.000033,
1190 biomes = {"Thorny Shrubs"},
1191 flags = "place_center_x, place_center_z",
1192 schematic = minetest.get_modpath("rp_default")
1193 .. "/schematics/rp_default_apple_tree.mts",
1194 y_min = -32000,
1195 y_max = 32000,
1197 minetest.register_decoration(
1199 deco_type = "schematic",
1200 place_on = {"rp_default:dirt_with_grass"},
1201 sidelen = 16,
1202 fill_ratio = 0.00067,
1203 biomes = {"Thorny Shrubs"},
1204 flags = "place_center_x, place_center_z",
1205 schematic = minetest.get_modpath("rp_default")
1206 .. "/schematics/rp_default_apple_tree_empty.mts",
1207 y_min = -32000,
1208 y_max = 32000,
1212 minetest.register_decoration(
1214 deco_type = "schematic",
1215 place_on = {"rp_default:dirt_with_grass"},
1216 sidelen = 16,
1217 fill_ratio = 0.009,
1218 biomes = {"Forest", "Deep Forest"},
1219 flags = "place_center_x, place_center_z",
1220 schematic = minetest.get_modpath("rp_default")
1221 .. "/schematics/rp_default_apple_tree.mts",
1222 y_min = -32000,
1223 y_max = 32000,
1226 minetest.register_decoration(
1228 deco_type = "schematic",
1229 place_on = {"rp_default:dirt_with_grass"},
1230 sidelen = 16,
1231 fill_ratio = 0.0009,
1232 biomes = {"Oak Forest"},
1233 flags = "place_center_x, place_center_z",
1234 schematic = minetest.get_modpath("rp_default")
1235 .. "/schematics/rp_default_oak_tree_big_1.mts",
1236 y_min = 1,
1237 y_max = 32000,
1240 minetest.register_decoration(
1242 deco_type = "schematic",
1243 place_on = {"rp_default:dirt_with_grass"},
1244 sidelen = 16,
1245 fill_ratio = 0.0045,
1246 biomes = {"Tall Oak Forest"},
1247 flags = "place_center_x, place_center_z",
1248 schematic = minetest.get_modpath("rp_default")
1249 .. "/schematics/rp_default_oak_tree_big_1.mts",
1250 y_min = 1,
1251 y_max = 32000,
1253 minetest.register_decoration(
1255 deco_type = "schematic",
1256 place_on = {"rp_default:dirt_with_grass"},
1257 sidelen = 16,
1258 fill_ratio = 0.0045,
1259 biomes = {"Tall Oak Forest"},
1260 flags = "place_center_x, place_center_z",
1261 schematic = minetest.get_modpath("rp_default")
1262 .. "/schematics/rp_default_oak_tree_big_2.mts",
1263 y_min = 1,
1264 y_max = 32000,
1268 minetest.register_decoration(
1270 deco_type = "schematic",
1271 place_on = {"rp_default:dirt_with_grass"},
1272 sidelen = 16,
1273 fill_ratio = 0.035,
1274 biomes = {"Dense Oak Forest"},
1275 flags = "place_center_x, place_center_z",
1276 schematic = minetest.get_modpath("rp_default")
1277 .. "/schematics/rp_default_oak_tree_big_1.mts",
1278 y_min = 1,
1279 y_max = 32000,
1281 minetest.register_decoration(
1283 deco_type = "schematic",
1284 place_on = {"rp_default:dirt_with_grass"},
1285 sidelen = 16,
1286 fill_ratio = 0.035,
1287 biomes = {"Dense Oak Forest"},
1288 flags = "place_center_x, place_center_z",
1289 schematic = minetest.get_modpath("rp_default")
1290 .. "/schematics/rp_default_oak_tree_big_2.mts",
1291 y_min = 1,
1292 y_max = 32000,
1297 minetest.register_decoration(
1299 deco_type = "schematic",
1300 place_on = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
1301 sidelen = 16,
1302 fill_ratio = 0.0008,
1303 biomes = {"Mixed Swamp", "Mixed Swamp Beach"},
1304 flags = "place_center_x, place_center_z",
1305 schematic = minetest.get_modpath("rp_default")
1306 .. "/schematics/rp_default_swamp_oak.mts",
1307 y_min = 0,
1308 y_max = 32000,
1311 minetest.register_decoration(
1313 deco_type = "schematic",
1314 place_on = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
1315 sidelen = 16,
1316 fill_ratio = 0.006,
1317 biomes = {"Swamp Forest", "Swamp Forest Beach"},
1318 flags = "place_center_x, place_center_z",
1319 schematic = minetest.get_modpath("rp_default")
1320 .. "/schematics/rp_default_swamp_oak.mts",
1321 y_min = 0,
1322 y_max = 32000,
1325 minetest.register_decoration(
1327 deco_type = "schematic",
1328 place_on = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt", "rp_default:dirt"},
1329 sidelen = 16,
1330 fill_ratio = 0.0001,
1331 biomes = {"Swamp Forest", "Swamp Forest Beach"},
1332 flags = "place_center_x, place_center_z",
1333 schematic = minetest.get_modpath("rp_default")
1334 .. "/schematics/rp_default_swamp_birch.mts",
1335 y_min = 0,
1336 y_max = 32000,
1338 minetest.register_decoration(
1340 deco_type = "schematic",
1341 place_on = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt", "rp_default:dirt"},
1342 sidelen = 16,
1343 fill_ratio = 0.003,
1344 biomes = {"Dry Swamp", "Dry Swamp Beach"},
1345 flags = "place_center_x, place_center_z",
1346 schematic = minetest.get_modpath("rp_default")
1347 .. "/schematics/rp_default_swamp_birch.mts",
1348 y_min = 0,
1349 y_max = 32000,
1354 local MYSTERY_FOREST_SPREAD = { x=500, y=500, z=500 }
1355 local MYSTERY_FOREST_OFFSET = 0.001
1356 local MYSTERY_FOREST_OFFSET_STAIRCASE = -0.001
1357 local MYSTERY_FOREST_OFFSET_APPLES = -0.0005
1358 local MYSTERY_FOREST_SCALE = 0.008
1360 minetest.register_decoration(
1362 deco_type = "schematic",
1363 place_on = {"rp_default:dirt_with_grass"},
1364 sidelen = 16,
1365 biomes = {"Mystery Forest"},
1366 flags = "place_center_x, place_center_z",
1367 schematic = minetest.get_modpath("rp_default")
1368 .. "/schematics/rp_default_staircase_tree.mts",
1369 y_min = 1,
1370 y_max = 32000,
1371 noise_params = {
1372 octaves = 2,
1373 scale = -MYSTERY_FOREST_SCALE,
1374 offset = MYSTERY_FOREST_OFFSET_STAIRCASE,
1375 spread = MYSTERY_FOREST_SPREAD,
1376 lacunarity = 2.0,
1377 persistence = 0.5,
1378 seed = 49204,
1382 minetest.register_decoration(
1384 deco_type = "schematic",
1385 place_on = {"rp_default:dirt_with_grass"},
1386 sidelen = 16,
1387 biomes = {"Mystery Forest"},
1388 flags = "place_center_x, place_center_z",
1389 schematic = minetest.get_modpath("rp_default")
1390 .. "/schematics/rp_default_layer_birch.mts",
1391 y_min = 1,
1392 y_max = 32000,
1393 noise_params = {
1394 octaves = 2,
1395 scale = MYSTERY_FOREST_SCALE,
1396 offset = MYSTERY_FOREST_OFFSET,
1397 spread = MYSTERY_FOREST_SPREAD,
1398 lacunarity = 2.0,
1399 persistence = 0.5,
1400 seed = 49204,
1404 minetest.register_decoration(
1406 deco_type = "schematic",
1407 place_on = {"rp_default:dirt_with_grass"},
1408 sidelen = 16,
1409 biomes = {"Mystery Forest"},
1410 flags = "place_center_x, place_center_z",
1411 schematic = minetest.get_modpath("rp_default")
1412 .. "/schematics/rp_default_telephone_tree.mts",
1413 y_min = 1,
1414 y_max = 32000,
1415 noise_params = {
1416 octaves = 2,
1417 scale = -MYSTERY_FOREST_SCALE,
1418 offset = MYSTERY_FOREST_OFFSET,
1419 spread = MYSTERY_FOREST_SPREAD,
1420 lacunarity = 2.0,
1421 persistence = 0.5,
1422 seed = 49204,
1426 minetest.register_decoration(
1428 deco_type = "schematic",
1429 place_on = {"rp_default:dirt_with_grass"},
1430 sidelen = 16,
1431 biomes = {"Mystery Forest"},
1432 flags = "place_center_x, place_center_z",
1433 schematic = minetest.get_modpath("rp_default")
1434 .. "/schematics/rp_default_telephone_tree_apples.mts",
1435 y_min = 1,
1436 y_max = 32000,
1437 noise_params = {
1438 octaves = 2,
1439 scale = -MYSTERY_FOREST_SCALE,
1440 offset = MYSTERY_FOREST_OFFSET_APPLES,
1441 spread = MYSTERY_FOREST_SPREAD,
1442 lacunarity = 2.0,
1443 persistence = 0.5,
1444 seed = 49204,
1451 minetest.register_decoration(
1453 deco_type = "schematic",
1454 place_on = {"rp_default:dirt_with_grass"},
1455 sidelen = 16,
1456 biomes = {"Mystery Forest"},
1457 flags = "place_center_x, place_center_z",
1458 schematic = minetest.get_modpath("rp_default")
1459 .. "/schematics/rp_default_cross_birch.mts",
1460 y_min = 1,
1461 y_max = 32000,
1462 noise_params = {
1463 octaves = 2,
1464 scale = MYSTERY_FOREST_SCALE,
1465 offset = MYSTERY_FOREST_OFFSET,
1466 spread = MYSTERY_FOREST_SPREAD,
1467 lacunarity = 2.0,
1468 persistence = 0.5,
1469 seed = 49204,
1473 minetest.register_decoration(
1475 deco_type = "schematic",
1476 place_on = {"rp_default:dirt_with_grass"},
1477 sidelen = 16,
1478 biomes = {"Poplar Plains"},
1479 flags = "place_center_x, place_center_z",
1480 schematic = minetest.get_modpath("rp_default")
1481 .. "/schematics/rp_default_poplar_large.mts",
1482 y_min = 1,
1483 y_max = 32000,
1484 noise_params = {
1485 octaves = 2,
1486 scale = 0.01,
1487 offset = -0.004,
1488 spread = {x=50,y=50,z=50},
1489 lacunarity = 2.0,
1490 persistence = 0.5,
1491 seed = 94325,
1494 minetest.register_decoration(
1496 deco_type = "schematic",
1497 place_on = {"rp_default:dirt_with_grass"},
1498 sidelen = 16,
1499 biomes = {"Poplar Plains"},
1500 flags = "place_center_x, place_center_z",
1501 schematic = minetest.get_modpath("rp_default")
1502 .. "/schematics/rp_default_poplar_small.mts",
1503 y_min = 1,
1504 y_max = 32000,
1505 noise_params = {
1506 octaves = 2,
1507 scale = 0.01,
1508 offset = -0.001,
1509 spread = {x=50,y=50,z=50},
1510 lacunarity = 2.0,
1511 persistence = 0.5,
1512 seed = 94325,
1515 minetest.register_decoration(
1517 deco_type = "schematic",
1518 place_on = {"rp_default:dirt_with_grass"},
1519 fill_ratio = 0.0002,
1520 sidelen = 16,
1521 biomes = {"Poplar Plains"},
1522 flags = "place_center_x, place_center_z",
1523 schematic = minetest.get_modpath("rp_default")
1524 .. "/schematics/rp_default_poplar_small.mts",
1525 y_min = 1,
1526 y_max = 32000,
1529 -- Small poplar tree blobs
1530 minetest.register_decoration(
1532 deco_type = "schematic",
1533 place_on = {"rp_default:dirt_with_grass"},
1534 sidelen = 8,
1535 biomes = {"Baby Poplar Plains"},
1536 flags = "place_center_x, place_center_z",
1537 schematic = minetest.get_modpath("rp_default")
1538 .. "/schematics/rp_default_poplar_small.mts",
1539 y_min = 1,
1540 y_max = 32000,
1541 noise_params = {
1542 octaves = 2,
1543 scale = 0.05,
1544 offset = -0.032,
1545 spread = {x=24,y=24,z=24},
1546 lacunarity = 2.0,
1547 persistence = 0.5,
1548 seed = 94325,
1552 -- Occasional lonely poplars
1553 minetest.register_decoration(
1555 deco_type = "schematic",
1556 place_on = {"rp_default:dirt_with_grass"},
1557 sidelen = 16,
1558 fill_ratio = 0.0002,
1559 biomes = {"Baby Poplar Plains"},
1560 flags = "place_center_x, place_center_z",
1561 schematic = minetest.get_modpath("rp_default")
1562 .. "/schematics/rp_default_poplar_small.mts",
1563 y_min = 1,
1564 y_max = 32000,
1568 -- Bushes
1569 minetest.register_decoration(
1571 deco_type = "schematic",
1572 place_on = {"rp_default:dirt_with_grass"},
1573 sidelen = 16,
1574 fill_ratio = 0.001,
1575 biomes = {"Birch Forest"},
1576 flags = "place_center_x, place_center_z",
1577 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_birch_bush.mts",
1578 y_min = 1,
1579 y_max = 32000,
1580 rotation = "0",
1583 minetest.register_decoration(
1585 deco_type = "schematic",
1586 place_on = {"rp_default:dirt_with_grass"},
1587 sidelen = 16,
1588 biomes = {"Baby Poplar Plains"},
1589 flags = "place_center_x, place_center_z",
1590 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
1591 y_min = 1,
1592 y_max = 32000,
1593 rotation = "0",
1594 noise_params = {
1595 octaves = 1,
1596 scale = 0.001,
1597 offset = -0.0000001,
1598 spread = { x = 50, y = 50, z = 50 },
1599 lacunarity = 2.0,
1600 persistence = 0.5,
1601 seed = 98421,
1605 minetest.register_decoration(
1607 deco_type = "schematic",
1608 place_on = {"rp_default:dirt_with_grass"},
1609 sidelen = 16,
1610 biomes = {"Thorny Shrubs"},
1611 flags = "place_center_x, place_center_z",
1612 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
1613 y_min = 3,
1614 y_max = 32000,
1615 rotation = "0",
1616 noise_params = {
1617 octaves = 1,
1618 scale = -0.004,
1619 offset = 0.002,
1620 spread = { x = 82, y = 82, z = 82 },
1621 lacunarity = 2.0,
1622 persistence = 0.5,
1623 seed = 43905,
1627 minetest.register_decoration(
1629 deco_type = "schematic",
1630 place_on = {"rp_default:dirt_with_grass"},
1631 sidelen = 16,
1632 fill_ratio = 0.006,
1633 biomes = {"Shrubbery"},
1634 flags = "place_center_x, place_center_z",
1635 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
1636 y_min = 1,
1637 y_max = 32000,
1638 rotation = "0",
1641 -- Wilderness apple trees: 50/50 split between
1642 -- trees with apples and those without.
1643 minetest.register_decoration(
1645 deco_type = "schematic",
1646 place_on = {"rp_default:dirt_with_grass"},
1647 sidelen = 16,
1648 fill_ratio = 0.002,
1649 biomes = {"Wilderness"},
1650 flags = "place_center_x, place_center_z",
1651 schematic = minetest.get_modpath("rp_default")
1652 .. "/schematics/rp_default_apple_tree.mts",
1653 y_min = -32000,
1654 y_max = 32000,
1656 minetest.register_decoration(
1658 deco_type = "schematic",
1659 place_on = {"rp_default:dirt_with_grass"},
1660 sidelen = 16,
1661 fill_ratio = 0.002,
1662 biomes = {"Wilderness"},
1663 flags = "place_center_x, place_center_z",
1664 schematic = minetest.get_modpath("rp_default")
1665 .. "/schematics/rp_default_apple_tree_empty.mts",
1666 y_min = -32000,
1667 y_max = 32000,
1670 minetest.register_decoration(
1672 deco_type = "schematic",
1673 place_on = {"rp_default:dirt_with_grass", "rp_default:dirt"},
1674 sidelen = 16,
1675 fill_ratio = 0.0001,
1676 biomes = {"Dry Swamp"},
1677 flags = "place_center_x, place_center_z",
1678 schematic = minetest.get_modpath("rp_default")
1679 .. "/schematics/rp_default_apple_tree.mts",
1680 y_min = -32000,
1681 y_max = 32000,
1684 minetest.register_decoration(
1686 deco_type = "schematic",
1687 place_on = {"rp_default:dirt_with_grass"},
1688 sidelen = 16,
1689 fill_ratio = 0.004,
1690 biomes = {"Wilderness"},
1691 flags = "place_center_x, place_center_z",
1692 schematic = minetest.get_modpath("rp_default")
1693 .. "/schematics/rp_default_oak_tree.mts",
1694 y_min = -32000,
1695 y_max = 32000,
1699 minetest.register_decoration(
1701 deco_type = "schematic",
1702 place_on = {"rp_default:dirt_with_grass"},
1703 sidelen = 16,
1704 fill_ratio = 0.001,
1705 biomes = {"Oak Shrubbery"},
1706 flags = "place_center_x, place_center_z",
1707 schematic = minetest.get_modpath("rp_default")
1708 .. "/schematics/rp_default_oak_tree.mts",
1709 y_min = 1,
1710 y_max = 32000,
1713 minetest.register_decoration(
1715 deco_type = "schematic",
1716 place_on = {"rp_default:dirt_with_grass"},
1717 sidelen = 16,
1718 fill_ratio = 0.02,
1719 biomes = {"Dense Oak Forest"},
1720 flags = "place_center_x, place_center_z",
1721 schematic = minetest.get_modpath("rp_default")
1722 .. "/schematics/rp_default_oak_tree.mts",
1723 y_min = 1,
1724 y_max = 32000,
1727 minetest.register_decoration(
1729 deco_type = "schematic",
1730 place_on = {"rp_default:dirt_with_grass"},
1731 sidelen = 16,
1732 fill_ratio = 0.0225,
1733 biomes = {"Oak Forest"},
1734 flags = "place_center_x, place_center_z",
1735 schematic = minetest.get_modpath("rp_default")
1736 .. "/schematics/rp_default_oak_tree.mts",
1737 y_min = 1,
1738 y_max = 32000,
1741 minetest.register_decoration(
1743 deco_type = "schematic",
1744 place_on = {"rp_default:dirt_with_grass"},
1745 sidelen = 16,
1746 fill_ratio = 0.0015,
1747 biomes = {"Tall Oak Forest"},
1748 flags = "place_center_x, place_center_z",
1749 schematic = minetest.get_modpath("rp_default")
1750 .. "/schematics/rp_default_oak_tree.mts",
1751 y_min = 1,
1752 y_max = 32000,
1759 -- Cactus decorations
1761 minetest.register_decoration(
1763 deco_type = "schematic",
1764 place_on = {"rp_default:sand"},
1765 sidelen = 16,
1766 fill_ratio = 0.004,
1767 biomes = {"Desert"},
1768 flags = "place_center_x, place_center_z",
1769 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_cactus.mts",
1770 y_min = 10,
1771 y_max = 500,
1772 rotation = "random",
1775 -- Rock decorations
1777 if mg_name ~= "v6" then
1778 minetest.register_decoration(
1780 deco_type = "schematic",
1781 place_on = {"rp_default:dry_dirt"},
1782 sidelen = 16,
1783 fill_ratio = 0.006,
1784 biomes = {"Wasteland"},
1785 flags = "place_center_x, place_center_z",
1786 schematic = minetest.get_modpath("rp_default")
1787 .. "/schematics/rp_default_small_rock.mts",
1788 y_min = 1,
1789 y_max = 32000,
1790 rotation = "random",
1793 minetest.register_decoration(
1795 deco_type = "schematic",
1796 place_on = {"rp_default:dry_dirt"},
1797 sidelen = 16,
1798 fill_ratio = 0.004,
1799 biomes = {"Wasteland"},
1800 flags = "place_center_x, place_center_z",
1801 schematic = minetest.get_modpath("rp_default")
1802 .. "/schematics/rp_default_large_rock.mts",
1803 y_min = 1,
1804 y_max = 32000,
1805 rotation = "random",
1808 minetest.register_decoration(
1810 deco_type = "schematic",
1811 place_on = {"rp_default:stone", "rp_default:dry_dirt"},
1812 sidelen = 16,
1813 fill_ratio = 0.003,
1814 biomes = {"Rocky Dryland"},
1815 flags = "place_center_x, place_center_z",
1816 schematic = minetest.get_modpath("rp_default")
1817 .. "/schematics/rp_default_small_rock.mts",
1818 y_min = 1,
1819 y_max = 32000,
1820 rotation = "random",
1823 minetest.register_decoration(
1825 deco_type = "schematic",
1826 place_on = {"rp_default:dry_dirt", "rp_default:dirt_with_dry_grass"},
1827 sidelen = 16,
1828 fill_ratio = 0.001,
1829 biomes = {"Savannic Wasteland"},
1830 flags = "place_center_x, place_center_z",
1831 schematic = minetest.get_modpath("rp_default")
1832 .. "/schematics/rp_default_small_rock.mts",
1833 y_min = 1,
1834 y_max = 32000,
1835 rotation = "random",
1839 -- Sulfur decorations
1841 minetest.register_decoration(
1843 deco_type = "simple",
1844 place_on = "rp_default:dry_dirt",
1845 sidelen = 16,
1846 fill_ratio = 0.005,
1847 biomes = {"Wasteland"},
1848 decoration = {"rp_default:stone_with_sulfur"},
1849 y_min = 2,
1850 y_max = 14,
1853 -- Tiny tree decorations
1855 minetest.register_decoration(
1857 deco_type = "schematic",
1858 place_on = {"rp_default:dry_dirt"},
1859 sidelen = 16,
1860 fill_ratio = 0.0001,
1861 biomes = {"Rocky Dryland"},
1862 flags = "place_center_x, place_center_z",
1863 schematic = minetest.get_modpath("rp_default")
1864 .. "/schematics/rp_default_tiny_birch.mts",
1865 y_min = 1,
1866 y_max = 32000,
1869 minetest.register_decoration(
1871 deco_type = "schematic",
1872 place_on = {"rp_default:dry_dirt"},
1873 sidelen = 16,
1874 fill_ratio = 0.00025,
1875 biomes = {"Rocky Dryland"},
1876 flags = "place_center_x, place_center_z",
1877 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_3layer.mts",
1878 y_min = 3,
1879 y_max = 32000,
1881 minetest.register_decoration(
1883 deco_type = "schematic",
1884 place_on = {"rp_default:dry_dirt"},
1885 sidelen = 16,
1886 fill_ratio = 0.00025,
1887 biomes = {"Rocky Dryland"},
1888 flags = "place_center_x, place_center_z",
1889 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_2layer.mts",
1890 y_min = 3,
1891 y_max = 32000,
1893 minetest.register_decoration(
1895 deco_type = "schematic",
1896 place_on = {"rp_default:dry_dirt"},
1897 sidelen = 16,
1898 fill_ratio = 0.002,
1899 biomes = {"Rocky Dryland"},
1900 flags = "place_center_x, place_center_z",
1901 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
1902 y_min = 3,
1903 y_max = 32000,
1905 minetest.register_decoration(
1907 deco_type = "schematic",
1908 place_on = {"rp_default:dry_dirt"},
1909 sidelen = 16,
1910 fill_ratio = 0.0001,
1911 biomes = {"Rocky Dryland"},
1912 flags = "place_center_x, place_center_z",
1913 schematic = minetest.get_modpath("rp_default")
1914 .. "/schematics/rp_default_tiny_birch.mts",
1915 y_min = 1,
1916 y_max = 32000,
1919 minetest.register_decoration(
1921 deco_type = "schematic",
1922 place_on = {"rp_default:dry_dirt"},
1923 sidelen = 16,
1924 fill_ratio = 0.00025,
1925 biomes = {"Rocky Dryland"},
1926 flags = "place_center_x, place_center_z",
1927 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_3layer.mts",
1928 y_min = 3,
1929 y_max = 32000,
1931 minetest.register_decoration(
1933 deco_type = "schematic",
1934 place_on = {"rp_default:dry_dirt"},
1935 sidelen = 16,
1936 fill_ratio = 0.00025,
1937 biomes = {"Rocky Dryland"},
1938 flags = "place_center_x, place_center_z",
1939 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_2layer.mts",
1940 y_min = 3,
1941 y_max = 32000,
1943 minetest.register_decoration(
1945 deco_type = "schematic",
1946 place_on = {"rp_default:dry_dirt"},
1947 sidelen = 16,
1948 fill_ratio = 0.002,
1949 biomes = {"Rocky Dryland"},
1950 flags = "place_center_x, place_center_z",
1951 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
1952 y_min = 3,
1953 y_max = 32000,
1956 minetest.register_decoration(
1958 deco_type = "schematic",
1959 place_on = {"rp_default:dry_dirt"},
1960 sidelen = 16,
1961 fill_ratio = 0.003,
1962 biomes = {"Wooded Dryland"},
1963 flags = "place_center_x, place_center_z",
1964 schematic = minetest.get_modpath("rp_default")
1965 .. "/schematics/rp_default_tiny_oak.mts",
1966 y_min = 1,
1967 y_max = 32000,
1970 minetest.register_decoration(
1972 deco_type = "schematic",
1973 place_on = {"rp_default:dry_dirt"},
1974 sidelen = 16,
1975 fill_ratio = 0.001,
1976 biomes = {"Wooded Dryland"},
1977 flags = "place_center_x, place_center_z",
1978 schematic = minetest.get_modpath("rp_default")
1979 .. "/schematics/rp_default_tiny_birch.mts",
1980 y_min = 1,
1981 y_max = 32000,
1985 minetest.register_decoration(
1987 deco_type = "schematic",
1988 place_on = {"rp_default:dry_dirt"},
1989 sidelen = 16,
1990 fill_ratio = 0.0002,
1991 biomes = {"Savannic Wasteland"},
1992 flags = "place_center_x, place_center_z",
1993 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
1994 y_min = 3,
1995 y_max = 32000,
2000 -- Bush/shrub decorations
2002 minetest.register_decoration(
2004 deco_type = "schematic",
2005 place_on = {"rp_default:dirt_with_grass"},
2006 sidelen = 16,
2007 fill_ratio = 0.0075,
2008 biomes = {"Oak Shrubbery"},
2009 flags = "place_center_x, place_center_z",
2010 schematic = minetest.get_modpath("rp_default")
2011 .. "/schematics/rp_default_oak_bush_wide.mts",
2012 y_min = 1,
2013 y_max = 32000,
2016 minetest.register_decoration(
2018 deco_type = "schematic",
2019 place_on = {"rp_default:dirt_with_grass"},
2020 sidelen = 16,
2021 fill_ratio = 0.03,
2022 biomes = {"Dense Oak Forest"},
2023 flags = "place_center_x, place_center_z",
2024 schematic = minetest.get_modpath("rp_default")
2025 .. "/schematics/rp_default_oak_bush_wide.mts",
2026 y_min = 1,
2027 y_max = 32000,
2030 minetest.register_decoration(
2032 deco_type = "schematic",
2033 place_on = {"rp_default:dirt_with_grass"},
2034 sidelen = 16,
2035 fill_ratio = 0.001,
2036 biomes = {"Oak Forest"},
2037 flags = "place_center_x, place_center_z",
2038 schematic = minetest.get_modpath("rp_default")
2039 .. "/schematics/rp_default_oak_bush_wide.mts",
2040 y_min = 1,
2041 y_max = 32000,
2044 minetest.register_decoration(
2046 deco_type = "schematic",
2047 place_on = {"rp_default:dirt_with_dry_grass"},
2048 sidelen = 16,
2049 fill_ratio = 0.005,
2050 biomes = {"Savanna", "Chaparral"},
2051 flags = "place_center_x, place_center_z",
2052 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush_small.mts",
2053 y_min = 3,
2054 y_max = 32000,
2055 rotation = "0",
2058 minetest.register_decoration(
2060 deco_type = "schematic",
2061 place_on = {"rp_default:dirt_with_dry_grass"},
2062 sidelen = 16,
2063 fill_ratio = 0.0025,
2064 biomes = {"Savannic Wasteland"},
2065 flags = "place_center_x, place_center_z",
2066 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush_small.mts",
2067 y_min = 3,
2068 y_max = 32000,
2069 rotation = "0",
2072 minetest.register_decoration(
2074 deco_type = "schematic",
2075 place_on = {"rp_default:dry_dirt"},
2076 sidelen = 16,
2077 fill_ratio = 0.001,
2078 biomes = {"Rocky Dryland", "Wooded Dryland"},
2079 flags = "place_center_x, place_center_z",
2080 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush_small.mts",
2081 y_min = 3,
2082 y_max = 32000,
2085 minetest.register_decoration(
2087 deco_type = "schematic",
2088 place_on = {"rp_default:dirt_with_dry_grass"},
2089 sidelen = 16,
2090 fill_ratio = 0.06,
2091 biomes = {"Chaparral"},
2092 flags = "place_center_x, place_center_z",
2093 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush.mts",
2094 y_min = 0,
2095 y_max = 32000,
2096 rotation = "0",
2098 minetest.register_decoration(
2100 deco_type = "schematic",
2101 place_on = {"rp_default:dirt_with_grass"},
2102 sidelen = 16,
2103 biomes = {"Thorny Shrubs"},
2104 flags = "place_center_x, place_center_z",
2105 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush.mts",
2106 y_min = 5,
2107 y_max = 32000,
2108 rotation = "0",
2109 noise_params = {
2110 octaves = 1,
2111 scale = -0.004,
2112 offset = -0.001,
2113 spread = { x = 82, y = 82, z = 82 },
2114 lacunarity = 2.0,
2115 persistence = 0.5,
2116 seed = 493421,
2121 minetest.register_decoration(
2123 deco_type = "schematic",
2124 place_on = {"rp_default:dirt_with_grass"},
2125 sidelen = 16,
2126 fill_ratio = 0.0003,
2127 biomes = {"Oak Shrubbery"},
2128 flags = "place_center_x, place_center_z",
2129 schematic = minetest.get_modpath("rp_default")
2130 .. "/schematics/rp_default_normal_bush_small.mts",
2131 y_min = 1,
2132 y_max = 32000,
2135 minetest.register_decoration(
2137 deco_type = "schematic",
2138 place_on = {"rp_default:dirt_with_grass"},
2139 sidelen = 16,
2140 fill_ratio = 0.006,
2141 biomes = {"Shrubbery"},
2142 flags = "place_center_x, place_center_z",
2143 schematic = minetest.get_modpath("rp_default")
2144 .. "/schematics/rp_default_normal_bush_small.mts",
2145 y_min = 1,
2146 y_max = 32000,
2151 minetest.register_decoration(
2153 deco_type = "schematic",
2154 place_on = {"rp_default:dirt_with_grass"},
2155 sidelen = 16,
2156 fill_ratio = 0.004,
2157 biomes = {"Grove"},
2158 flags = "place_center_x, place_center_z",
2159 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
2160 y_min = 3,
2161 y_max = 32000,
2162 rotation = "0",
2164 minetest.register_decoration(
2166 deco_type = "schematic",
2167 place_on = {"rp_default:dirt_with_grass"},
2168 sidelen = 16,
2169 fill_ratio = 0.0004,
2170 biomes = {"Wilderness"},
2171 flags = "place_center_x, place_center_z",
2172 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush.mts",
2173 y_min = 3,
2174 y_max = 32000,
2175 rotation = "0",
2177 minetest.register_decoration(
2179 deco_type = "schematic",
2180 place_on = {"rp_default:dirt_with_grass"},
2181 sidelen = 16,
2182 fill_ratio = 0.0036,
2183 biomes = {"Wilderness"},
2184 flags = "place_center_x, place_center_z",
2185 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
2186 y_min = 3,
2187 y_max = 32000,
2188 rotation = "0",
2193 -- Thistle decorations
2195 minetest.register_decoration(
2197 deco_type = "simple",
2198 place_on = "rp_default:dirt_with_grass",
2199 sidelen = 16,
2200 fill_ratio = 0.024,
2201 biomes = {"Wilderness"},
2202 decoration = {"rp_default:thistle"},
2203 height = 2,
2204 y_min = -32000,
2205 y_max = 32000,
2207 minetest.register_decoration(
2209 deco_type = "simple",
2210 place_on = {"rp_default:dirt_with_grass", "rp_default:dry_dirt"},
2211 sidelen = 4,
2212 biomes = {"Thorny Shrubs"},
2213 decoration = {"rp_default:thistle"},
2214 height = 2,
2215 y_min = -32000,
2216 y_max = 32000,
2217 noise_params = {
2218 octaves = 2,
2219 scale = 1,
2220 offset = -0.5,
2221 spread = { x = 12, y = 12, z = 12 },
2222 lacunarity = 2.0,
2223 persistence = 0.5,
2224 seed = 43905,
2228 -- Papyrus decorations
2230 -- Beach papyrus
2231 minetest.register_decoration(
2233 deco_type = "simple",
2234 place_on = {"rp_default:sand", "rp_default:dirt", "rp_default:dirt_with_grass"},
2235 spawn_by = {"rp_default:water_source", "rp_default:water_flowing"},
2236 num_spawn_by = 1,
2237 sidelen = 16,
2238 fill_ratio = 0.08,
2239 biomes = {"Grassland Ocean", "Grassland", "Forest Ocean", "Forest", "Wilderness Ocean", "Wilderness", "Birch Forest Ocean", "Tall Birch Forest Ocean", "Marsh Beach"},
2240 decoration = {"rp_default:papyrus"},
2241 height = 2,
2242 y_max = 3,
2243 y_min = 0,
2246 -- Grassland papyrus
2247 minetest.register_decoration(
2249 deco_type = "simple",
2250 place_on = {"rp_default:dirt_with_grass"},
2251 spawn_by = {"group:water"},
2252 num_spawn_by = 1,
2253 sidelen = 16,
2254 fill_ratio = 0.08,
2255 biomes = {"Grassland", "Marsh", "Forest", "Deep Forest", "Wilderness", "Baby Poplar Plains"},
2256 decoration = {"rp_default:papyrus"},
2257 height = 2,
2258 height_max = 3,
2259 y_max = 30,
2260 y_min = 4,
2264 -- Swamp papyrus
2265 minetest.register_decoration(
2267 deco_type = "simple",
2268 place_on = {"rp_default:swamp_dirt", "rp_default:dirt_with_swamp_grass"},
2269 spawn_by = {"group:water"},
2270 num_spawn_by = 1,
2271 sidelen = 16,
2272 fill_ratio = 0.30,
2273 biomes = {"Mixed Swamp"},
2274 decoration = {"rp_default:papyrus"},
2275 height = 3,
2276 height_max = 4,
2277 y_max = 31000,
2278 y_min = -100,
2281 minetest.register_decoration(
2283 deco_type = "simple",
2284 place_on = {"rp_default:swamp_dirt", "rp_default:dirt_with_swamp_grass"},
2285 spawn_by = {"group:water"},
2286 num_spawn_by = 1,
2287 sidelen = 16,
2288 fill_ratio = 0.60,
2289 biomes = {"Papyrus Swamp"},
2290 decoration = {"rp_default:papyrus"},
2291 height = 4,
2292 height_max = 4,
2293 y_max = 31000,
2294 y_min = -100,
2297 -- Flower decorations
2299 minetest.register_decoration(
2301 deco_type = "simple",
2302 place_on = "rp_default:dirt_with_grass",
2303 sidelen = 16,
2304 fill_ratio = 0.04,
2305 biomes = {"Grassland", "Wilderness", "Orchard", "Baby Poplar Plains", "Birch Forest"},
2306 decoration = {"rp_default:flower"},
2307 y_min = -32000,
2308 y_max = 32000,
2311 -- Grass decorations
2313 if mg_name ~= "v6" then
2314 minetest.register_decoration(
2316 deco_type = "simple",
2317 place_on = "rp_default:dirt_with_grass",
2318 sidelen = 16,
2319 fill_ratio = 0.18,
2320 biomes = {"Grassland", "Orchard", "Swamp Meadow", "Baby Poplar Plains", "Poplar Plains", "Shrubbery", "Oak Shrubbery", "Thorny Shrubs", "Dry Swamp"},
2321 decoration = {"rp_default:grass"},
2322 y_min = 10,
2323 y_max = 32000,
2327 minetest.register_decoration(
2329 deco_type = "simple",
2330 place_on = "rp_default:dirt_with_swamp_grass",
2331 sidelen = 16,
2332 fill_ratio = 0.04,
2333 biomes = {"Mixed Swamp", "Dry Swamp", "Swamp Meadow", "Swamp Papyrus", "Swamp Forest"},
2334 decoration = {"rp_default:swamp_grass"},
2335 y_min = 2,
2336 y_max = 40,
2339 minetest.register_decoration(
2341 deco_type = "simple",
2342 place_on = "rp_default:dirt_with_dry_grass",
2343 sidelen = 16,
2344 fill_ratio = 0.07,
2345 biomes = {"Desert", "Savanna", "Chaparral", "Savannic Wasteland"},
2346 decoration = {"rp_default:dry_grass"},
2347 y_min = 10,
2348 y_max = 500,
2351 if mg_name ~= "v6" then
2352 minetest.register_decoration(
2354 deco_type = "simple",
2355 place_on = "rp_default:dirt_with_grass",
2356 sidelen = 16,
2357 fill_ratio = 0.08,
2358 biomes = {"Forest", "Deep Forest", "Birch Forest", "Tall Birch Forest", "Oak Forest", "Dense Oak Forest", "Tall Oak Forest", "Mystery Forest"},
2359 decoration = {"rp_default:grass"},
2360 y_min = 0,
2361 y_max = 32000,
2364 minetest.register_decoration(
2366 deco_type = "simple",
2367 place_on = "rp_default:dirt_with_grass",
2368 sidelen = 16,
2369 fill_ratio = 0.08,
2370 biomes = {"Forest", "Marsh", "Grove", "Shrubbery", "Oak Shrubbery"},
2371 decoration = {"rp_default:tall_grass"},
2372 y_min = 0,
2373 y_max = 32000,
2376 minetest.register_decoration(
2378 deco_type = "simple",
2379 place_on = "rp_default:dirt_with_grass",
2380 sidelen = 16,
2381 fill_ratio = 0.15,
2382 biomes = {"Deep Forest", "Tall Oak Forest"},
2383 decoration = {"rp_default:tall_grass"},
2384 y_min = 0,
2385 y_max = 32000,
2388 minetest.register_decoration(
2390 deco_type = "simple",
2391 place_on = "rp_default:dirt_with_grass",
2392 sidelen = 16,
2393 fill_ratio = 0.05,
2394 biomes = {"Thorny Shrubs"},
2395 decoration = {"rp_default:tall_grass"},
2396 y_min = 0,
2397 y_max = 32000,
2399 minetest.register_decoration(
2401 deco_type = "simple",
2402 place_on = "rp_default:dirt_with_grass",
2403 sidelen = 16,
2404 fill_ratio = 0.1,
2405 biomes = {"Thorny Shrubs"},
2406 decoration = {"rp_default:grass"},
2407 y_min = 0,
2408 y_max = 32000,
2413 minetest.register_decoration(
2415 deco_type = "simple",
2416 place_on = "rp_default:dirt_with_grass",
2417 sidelen = 16,
2418 fill_ratio = 0.16,
2419 biomes = {"Wilderness", "Thorny Shrubs"},
2420 decoration = {"rp_default:grass"},
2421 y_min = -32000,
2422 y_max = 32000,
2425 minetest.register_decoration(
2427 deco_type = "simple",
2428 place_on = "rp_default:dirt_with_grass",
2429 sidelen = 16,
2430 fill_ratio = 0.12,
2431 biomes = {"Wilderness", "Thorny Shrubs"},
2432 decoration = {"rp_default:tall_grass"},
2433 y_min = -32000,
2434 y_max = 32000,
2437 -- Fern decorations
2439 minetest.register_decoration(
2441 deco_type = "simple",
2442 place_on = "rp_default:dirt_with_grass",
2443 sidelen = 16,
2444 fill_ratio = 0.02,
2445 biomes = {"Wilderness", "Grove", "Tall Oak Forest", "Mystery Forest"},
2446 decoration = {"rp_default:fern"},
2447 y_min = -32000,
2448 y_max = 32000,
2451 -- Clam decorations
2453 minetest.register_decoration(
2455 deco_type = "simple",
2456 place_on = {"rp_default:sand", "rp_default:gravel"},
2457 sidelen = 16,
2458 fill_ratio = 0.02,
2459 biomes = {"Grassland Ocean", "Wasteland Beach", "Forest Ocean", "Wilderness Ocean", "Grove Ocean", "Thorny Shrubs Ocean", "Birch Forest Ocean", "Tall Birch Forest Ocean", "Savanna Ocean", "Rocky Dryland Ocean", "Savannic Wasteland Ocean", "Desert Ocean", "Baby Poplar Plains"},
2460 decoration = {"rp_default:clam"},
2461 y_min = 0,
2462 y_max = 1,
2466 --[[ ORES ]]
2468 -- Graphite ore
2470 minetest.register_ore( -- Common above sea level mainly
2472 ore_type = "scatter",
2473 ore = "rp_default:stone_with_graphite",
2474 wherein = "rp_default:stone",
2475 clust_scarcity = 9*9*9,
2476 clust_num_ores = 8,
2477 clust_size = 8,
2478 y_min = -8,
2479 y_max = 32,
2482 minetest.register_ore( -- Slight scattering deeper down
2484 ore_type = "scatter",
2485 ore = "rp_default:stone_with_graphite",
2486 wherein = "rp_default:stone",
2487 clust_scarcity = 13*13*13,
2488 clust_num_ores = 6,
2489 clust_size = 8,
2490 y_min = -31000,
2491 y_max = -32,
2494 -- Coal ore
2496 minetest.register_ore( -- Even distribution
2498 ore_type = "scatter",
2499 ore = "rp_default:stone_with_coal",
2500 wherein = "rp_default:stone",
2501 clust_scarcity = 10*10*10,
2502 clust_num_ores = 8,
2503 clust_size = 4,
2504 y_min = -31000,
2505 y_max = 32,
2508 minetest.register_ore( -- Dense sheet
2510 ore_type = "scatter",
2511 ore = "rp_default:stone_with_coal",
2512 wherein = "rp_default:stone",
2513 clust_scarcity = 7*7*7,
2514 clust_num_ores = 10,
2515 clust_size = 8,
2516 y_min = -40,
2517 y_max = -32,
2520 minetest.register_ore( -- Deep ore sheet
2522 ore_type = "scatter",
2523 ore = "rp_default:stone_with_coal",
2524 wherein = "rp_default:stone",
2525 clust_scarcity = 6*6*6,
2526 clust_num_ores = 26,
2527 clust_size = 12,
2528 y_min = -130,
2529 y_max = -120,
2532 -- Iron ore
2534 minetest.register_ore( -- Even distribution
2536 ore_type = "scatter",
2537 ore = "rp_default:stone_with_iron",
2538 wherein = "rp_default:stone",
2539 clust_scarcity = 12*12*12,
2540 clust_num_ores = 4,
2541 clust_size = 3,
2542 y_min = -31000,
2543 y_max = -8,
2546 minetest.register_ore( -- Dense sheet
2548 ore_type = "scatter",
2549 ore = "rp_default:stone_with_iron",
2550 wherein = "rp_default:stone",
2551 clust_scarcity = 8*8*8,
2552 clust_num_ores = 20,
2553 clust_size = 12,
2554 y_min = -32,
2555 y_max = -24,
2558 minetest.register_ore( -- Dense sheet
2560 ore_type = "scatter",
2561 ore = "rp_default:stone_with_iron",
2562 wherein = "rp_default:stone",
2563 clust_scarcity = 7*7*7,
2564 clust_num_ores = 17,
2565 clust_size = 6,
2566 y_min = -80,
2567 y_max = -60,
2570 -- Tin ore
2572 minetest.register_ore( -- Even distribution
2574 ore_type = "scatter",
2575 ore = "rp_default:stone_with_tin",
2576 wherein = "rp_default:stone",
2577 clust_scarcity = 14*14*14,
2578 clust_num_ores = 8,
2579 clust_size = 4,
2580 y_min = -31000,
2581 y_max = -100,
2584 minetest.register_ore( -- Dense sheet
2586 ore_type = "scatter",
2587 ore = "rp_default:stone_with_tin",
2588 wherein = "rp_default:stone",
2589 clust_scarcity = 7*7*7,
2590 clust_num_ores = 10,
2591 clust_size = 6,
2592 y_min = -150,
2593 y_max = -140,
2596 -- Copper ore
2598 minetest.register_ore( -- Begin sheet
2600 ore_type = "scatter",
2601 ore = "rp_default:stone_with_copper",
2602 wherein = "rp_default:stone",
2603 clust_scarcity = 6*6*6,
2604 clust_num_ores = 12,
2605 clust_size = 5,
2606 y_min = -90,
2607 y_max = -80,
2610 minetest.register_ore( -- Rare even distribution
2612 ore_type = "scatter",
2613 ore = "rp_default:stone_with_copper",
2614 wherein = "rp_default:stone",
2615 clust_scarcity = 13*13*13,
2616 clust_num_ores = 10,
2617 clust_size = 5,
2618 y_min = -31000,
2619 y_max = -90,
2622 minetest.register_ore( -- Large clusters
2624 ore_type = "scatter",
2625 ore = "rp_default:stone_with_copper",
2626 wherein = "rp_default:stone",
2627 clust_scarcity = 8*8*8,
2628 clust_num_ores = 22,
2629 clust_size = 10,
2630 y_min = -230,
2631 y_max = -180,
2634 -- Small gravel blobs
2635 minetest.register_ore({
2636 ore_type = "blob",
2637 ore = "rp_default:gravel",
2638 wherein = "rp_default:stone",
2639 clust_scarcity = 10*10*10,
2640 clust_num_ores = 33,
2641 clust_size = 4,
2642 y_min = -31000,
2643 y_max = 31000,
2644 noise_params = {
2645 offset = 0,
2646 scale = 1,
2647 spread = {x=150, y=150, z=150},
2648 seed = 58943,
2649 octaves = 3,
2650 persist = 0.5,
2651 lacunarity = 2,
2652 flags = "defaults",
2656 -- Small sand blobs
2657 minetest.register_ore({
2658 ore_type = "blob",
2659 ore = "rp_default:sand",
2660 wherein = "rp_default:stone",
2661 clust_scarcity = 10*10*10,
2662 clust_num_ores = 40,
2663 clust_size = 4,
2664 y_min = -31000,
2665 y_max = 31000,
2666 noise_params = {
2667 offset = 0,
2668 scale = 1,
2669 spread = {x=150, y=150, z=150},
2670 seed = 38943,
2671 octaves = 3,
2672 persist = 0.5,
2673 lacunarity = 2,
2674 flags = "defaults",
2679 -- Dirt, Dry Dirt and Swamp Dirt blobs.
2680 -- These get generated depending on the biome.
2681 -- The following code is to generate the list
2682 -- of biomes that include either dirt, dry dirt or swamp dirt.
2684 -- Returns a list of biomes that use the specified nodename
2685 -- as its dirt blob, by using the data from
2686 -- default.get_biome_info.
2687 -- * nodename: A name of the node (a dirt node)
2688 local get_dirt_biomes = function(nodename)
2689 local biomes = default.get_core_biomes()
2690 local out_biomes = {}
2691 for b=1, #biomes do
2692 local biome_info = default.get_biome_info(biomes[b])
2693 -- Add biome to list iff it uses the specified node as dirt blob
2694 if biome_info.dirt_blob ~= nil and biome_info.dirt_blob == nodename then
2695 table.insert(out_biomes, biomes[b])
2698 return out_biomes
2701 local dirt_biomes = get_dirt_biomes("rp_default:dirt")
2702 local dry_dirt_biomes = get_dirt_biomes("rp_default:dry_dirt")
2703 local swamp_dirt_biomes = get_dirt_biomes("rp_default:swamp_dirt")
2705 minetest.log("verbose", "[rp_default] List of builtin biomes with Dirt blobs: "..dump(dirt_biomes))
2706 minetest.log("verbose", "[rp_default] List of builtin biomes with Dry Dirt blobs: "..dump(dry_dirt_biomes))
2707 minetest.log("verbose", "[rp_default] List of builtin biomes with Swamp Dirt blobs: "..dump(swamp_dirt_biomes))
2709 local np_dirtlike = {
2710 offset = 0,
2711 scale = 1,
2712 spread = {x=150, y=150, z=150},
2713 seed = 98943,
2714 octaves = 3,
2715 persist = 0.5,
2716 lacunarity = 2,
2717 flags = "defaults",
2720 minetest.register_ore({
2721 ore_type = "blob",
2722 ore = "rp_default:dirt",
2723 wherein = "rp_default:stone",
2724 clust_scarcity = 10*10*10,
2725 clust_num_ores = 33,
2726 clust_size = 4,
2727 y_min = -31000,
2728 y_max = 31000,
2729 biomes = dirt_biomes,
2730 noise_params = np_dirtlike,
2733 minetest.register_ore({
2734 ore_type = "blob",
2735 ore = "rp_default:dry_dirt",
2736 wherein = "rp_default:stone",
2737 clust_scarcity = 10*10*10,
2738 clust_num_ores = 33,
2739 clust_size = 4,
2740 y_min = -31000,
2741 y_max = 31000,
2742 biomes = dry_dirt_biomes,
2743 noise_params = np_dirtlike,
2746 minetest.register_ore({
2747 ore_type = "blob",
2748 ore = "rp_default:swamp_dirt",
2749 wherein = "rp_default:stone",
2750 clust_scarcity = 10*10*10,
2751 clust_num_ores = 33,
2752 clust_size = 4,
2753 y_min = -31000,
2754 y_max = 31000,
2755 biomes = swamp_dirt_biomes,
2756 noise_params = np_dirtlike,