Limit swamp height
[Pixture/pixture_revival.git] / mods / rp_default / mapgen.lua
blob4b26e099b3570599d25ec06757fcf56d859452d8
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
86 minetest.register_biome(newdef)
88 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",
109 depth_filler = 0,
110 depth_top = 1,
112 y_min = 2,
113 y_max = SWAMP_Y_MAX,
115 heat_point = 91,
116 humidity_point = 96,
118 register_ocean_and_beach("Marsh", "rp_default:dirt")
119 default.set_biome_info("Marsh", "grassy")
121 minetest.register_biome(
123 name = "Mixed Swamp",
125 node_top = "rp_default:dirt_with_swamp_grass",
126 node_filler = "rp_default:swamp_dirt",
127 node_cave_liquid = "rp_default:swamp_water_source",
129 depth_filler = 7,
130 depth_top = 1,
132 y_min = 2,
133 y_max = SWAMP_Y_MAX,
135 heat_point = 36,
136 humidity_point = 86,
138 register_ocean_and_beach("Mixed Swamp", "rp_default:sand")
139 default.set_biome_info("Mixed Swamp", "swamp")
141 minetest.register_biome(
143 name = "Deep Forest",
145 node_top = "rp_default:dirt_with_grass",
146 node_filler = "rp_default:dirt",
148 depth_filler = 6,
149 depth_top = 1,
151 y_min = 30,
152 y_max = 40,
154 heat_point = 24,
155 humidity_point = 24,
157 default.set_biome_info("Deep Forest", "grassy")
159 -- TODO: Replace with an actual biome
160 minetest.register_biome(
162 name = "Deep Forest Lowland",
164 node_top = "rp_default:dirt_with_grass",
165 node_filler = "rp_default:dirt",
167 depth_filler = 6,
168 depth_top = 1,
170 y_min = 1,
171 y_max = 29,
173 heat_point = 24,
174 humidity_point = 24,
176 register_ocean_and_beach("Deep Forest Lowland", "rp_default:dirt")
177 default.set_biome_info("Deep Forest Lowland", "grassy")
179 minetest.register_biome(
181 name = "Forest",
183 node_top = "rp_default:dirt_with_grass",
184 node_filler = "rp_default:dirt",
186 depth_filler = 6,
187 depth_top = 1,
189 y_min = 2,
190 y_max = 200,
192 heat_point = 48,
193 humidity_point = 34,
195 register_ocean_and_beach("Forest", "rp_default:sand")
196 default.set_biome_info("Forest", "grassy")
198 minetest.register_biome(
200 name = "Grove",
202 node_top = "rp_default:dirt_with_grass",
203 node_filler = "rp_default:dirt",
205 depth_filler = 4,
206 depth_top = 1,
208 y_min = 3,
209 y_max = 32000,
211 heat_point = 45,
212 humidity_point = 19,
214 register_ocean_and_beach("Grove", "rp_default:sand")
215 default.set_biome_info("Grove", "grassy")
217 minetest.register_biome(
219 name = "Wilderness",
221 node_top = "rp_default:dirt_with_grass",
222 node_filler = "rp_default:dirt",
224 depth_filler = 6,
225 depth_top = 1,
227 y_min = 3,
228 y_max = 32000,
230 heat_point = 76,
231 humidity_point = 30,
233 register_ocean_and_beach("Wilderness", "rp_default:sand")
234 default.set_biome_info("Wilderness", "grassy")
236 -- Note: Grassland is below Orchard
237 minetest.register_biome(
239 name = "Grassland",
241 node_top = "rp_default:dirt_with_grass",
242 node_filler = "rp_default:dirt",
244 depth_filler = 4,
245 depth_top = 1,
247 y_min = 3,
248 y_max = ORCHARD_Y_MIN - 1,
250 heat_point = 71,
251 humidity_point = 52,
253 register_ocean_and_beach("Grassland", "rp_default:sand")
254 default.set_biome_info("Grassland", "grassy")
256 -- Note: Orchard is the 'highland' version of Grassland
257 minetest.register_biome(
259 name = "Orchard",
261 node_top = "rp_default:dirt_with_grass",
262 node_filler = "rp_default:dirt",
264 depth_filler = 4,
265 depth_top = 1,
267 y_min = ORCHARD_Y_MIN,
268 y_max = 32000,
270 heat_point = 71,
271 humidity_point = 52,
273 default.set_biome_info("Orchard", "grassy")
275 -- Note: Shrubbery is below Chaparral
276 minetest.register_biome(
278 name = "Shrubbery",
280 node_top = "rp_default:dirt_with_grass",
281 node_filler = "rp_default:dirt",
283 depth_filler = 3,
284 depth_top = 1,
286 y_min = 2,
287 y_max = 55,
289 heat_point = 107,
290 humidity_point = 45,
292 register_ocean_and_beach("Shrubbery", "rp_default:sand")
293 default.set_biome_info("Shrubbery", "grassy")
295 -- Note: High biome. This is the highland version of Shrubbery
296 minetest.register_biome(
298 name = "Chaparral",
300 node_top = "rp_default:dirt_with_dry_grass",
301 node_filler = "rp_default:dry_dirt",
303 depth_filler = 0,
304 depth_top = 1,
306 y_min = 56,
307 y_max = 32000,
309 heat_point = 107,
310 humidity_point = 45,
312 default.set_biome_info("Chaparral", "savannic")
314 minetest.register_biome(
316 name = "Savanna",
318 node_top = "rp_default:dirt_with_dry_grass",
319 node_filler = "rp_default:dry_dirt",
321 depth_filler = 2,
322 depth_top = 1,
324 y_min = 2,
325 y_max = 55,
327 heat_point = 101,
328 humidity_point = 25,
330 register_ocean_and_beach("Savanna", "rp_default:sand")
331 default.set_biome_info("Savanna", "savannic")
333 minetest.register_biome(
335 name = "Desert",
337 node_top = "rp_default:sand",
338 node_filler = "rp_default:sandstone",
340 depth_filler = 8,
341 depth_top = 3,
343 y_min = 1,
344 y_max = 32000,
346 heat_point = 112,
347 humidity_point = 32,
349 register_ocean_and_beach("Desert", "rp_default:sand")
350 default.set_biome_info("Desert", "desertic")
352 minetest.register_biome(
354 name = "Wasteland",
356 node_top = "rp_default:dry_dirt",
357 node_filler = "rp_default:sandstone",
359 depth_filler = 3,
360 depth_top = 1,
362 y_min = 2,
363 y_max = 32000,
365 heat_point = 95,
366 humidity_point = 20,
368 register_ocean_and_beach("Wasteland", "rp_default:dry_dirt", 5, "rp_default:gravel")
369 default.set_biome_info("Wasteland", "drylandic")
371 minetest.register_biome(
373 name = "Rocky Dryland",
375 node_top = "rp_default:dry_dirt",
376 node_filler = "rp_default:dry_dirt",
378 depth_filler = 0,
379 depth_top = 1,
381 y_min = 3,
382 y_max = 32000,
384 heat_point = 79,
385 humidity_point = 1,
387 register_ocean_and_beach("Rocky Dryland", "rp_default:gravel")
388 default.set_biome_info("Rocky Dryland", "drylandic")
390 minetest.register_biome(
392 name = "Wooded Dryland",
394 node_top = "rp_default:dry_dirt",
395 node_filler = "rp_default:dry_dirt",
397 depth_filler = 4,
398 depth_top = 1,
400 y_min = 1,
401 y_max = 32000,
403 heat_point = 78,
404 humidity_point = 9,
406 register_ocean_and_beach("Wooded Dryland", "rp_default:dry_dirt")
407 default.set_biome_info("Wooded Dryland", "drylandic")
409 minetest.register_biome(
411 name = "Savannic Wasteland",
413 node_top = "rp_default:dry_dirt",
414 node_filler = "rp_default:sandstone",
416 depth_filler = 2,
417 depth_top = 1,
419 y_min = 2,
420 y_max = 32000,
422 heat_point = 94,
423 humidity_point = 14,
425 register_ocean_and_beach("Savannic Wasteland", "rp_default:sand")
426 default.set_biome_info("Savannic Wasteland", "savannic")
428 minetest.register_biome(
430 name = "Thorny Shrubs",
432 node_top = "rp_default:dirt_with_grass",
433 node_filler = "rp_default:dirt",
435 depth_filler = 4,
436 depth_top = 1,
438 y_min = 2,
439 y_max = 200,
441 heat_point = 76,
442 humidity_point = 15,
444 register_ocean_and_beach("Thorny Shrubs", "rp_default:sand")
445 default.set_biome_info("Thorny Shrubs", "grassy")
447 minetest.register_biome(
449 name = "Mystery Forest",
451 node_top = "rp_default:dirt_with_grass",
452 node_filler = "rp_default:dirt",
454 depth_filler = 4,
455 depth_top = 1,
457 y_min = 1,
458 y_max = 200,
460 heat_point = 18,
461 humidity_point = 2,
463 register_ocean_and_beach("Mystery Forest", "rp_default:dirt")
464 default.set_biome_info("Mystery Forest", "grassy")
466 minetest.register_biome(
468 name = "Poplar Plains",
470 node_top = "rp_default:dirt_with_grass",
471 node_filler = "rp_default:dirt",
473 depth_filler = 4,
474 depth_top = 1,
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",
492 depth_filler = 4,
493 depth_top = 1,
495 y_min = 2,
496 y_max = 32000,
498 heat_point = 58,
499 humidity_point = 9,
501 register_ocean_and_beach("Baby Poplar Plains", "rp_default:sand")
502 default.set_biome_info("Baby Poplar Plains", "grassy")
504 minetest.register_biome(
506 name = "Tall Birch Forest",
508 node_top = "rp_default:dirt_with_grass",
509 node_filler = "rp_default:dirt",
511 depth_filler = 3,
512 depth_top = 1,
514 y_min = 2,
515 y_max = 32000,
517 heat_point = 6,
518 humidity_point = 14,
520 register_ocean_and_beach("Tall Birch Forest", "rp_default:sand")
521 default.set_biome_info("Tall Birch Forest", "grassy")
523 minetest.register_biome(
525 name = "Birch Forest",
527 node_top = "rp_default:dirt_with_grass",
528 node_filler = "rp_default:dirt",
530 depth_filler = 3,
531 depth_top = 1,
533 y_min = 1,
534 y_max = 32000,
536 heat_point = 18,
537 humidity_point = 15,
539 register_ocean_and_beach("Birch Forest", "rp_default:sand")
540 default.set_biome_info("Birch Forest", "grassy")
542 minetest.register_biome(
544 name = "Oak Shrubbery",
546 node_top = "rp_default:dirt_with_grass",
547 node_filler = "rp_default:dirt",
549 depth_filler = 3,
550 depth_top = 1,
552 y_min = 1,
553 y_max = 32000,
555 heat_point = 22,
556 humidity_point = 44,
558 register_ocean_and_beach("Oak Shrubbery", "rp_default:dirt")
559 default.set_biome_info("Oak Shrubbery", "grassy")
561 minetest.register_biome(
563 name = "Oak Forest",
565 node_top = "rp_default:dirt_with_grass",
566 node_filler = "rp_default:dirt",
568 depth_filler = 5,
569 depth_top = 1,
571 y_min = 1,
572 y_max = 32000,
574 heat_point = 22,
575 humidity_point = 44,
577 register_ocean_and_beach("Oak Forest", "rp_default:sand")
578 default.set_biome_info("Oak Forest", "grassy")
580 minetest.register_biome(
582 name = "Tall Oak Forest",
584 node_top = "rp_default:dirt_with_grass",
585 node_filler = "rp_default:dirt",
587 depth_filler = 6,
588 depth_top = 1,
590 y_min = 1,
591 y_max = 32000,
593 heat_point = 10,
594 humidity_point = 43,
596 register_ocean_and_beach("Tall Oak Forest", "rp_default:sand")
597 default.set_biome_info("Tall Oak Forest", "grassy")
599 minetest.register_biome(
601 name = "Dense Oak Forest",
603 node_top = "rp_default:dirt_with_grass",
604 node_filler = "rp_default:dirt",
606 depth_filler = 7,
607 depth_top = 1,
609 y_min = 1,
610 y_max = 32000,
612 heat_point = 0,
613 humidity_point = 43,
615 register_ocean_and_beach("Dense Oak Forest", "rp_default:sand")
616 default.set_biome_info("Dense Oak Forest", "grassy")
618 minetest.register_biome(
620 name = "Swamp Meadow",
622 node_top = "rp_default:dirt_with_swamp_grass",
623 node_filler = "rp_default:swamp_dirt",
624 node_cave_liquid = "rp_default:swamp_water_source",
626 depth_filler = 7,
627 depth_top = 1,
629 y_min = 2,
630 y_max = SWAMP_Y_MAX,
632 heat_point = 62,
633 humidity_point = 93,
635 register_ocean_and_beach("Swamp Meadow", "rp_default:swamp_dirt")
636 default.set_biome_info("Swamp Meadow", "swampy")
638 minetest.register_biome(
640 name = "Swamp Forest",
642 node_top = "rp_default:dirt_with_swamp_grass",
643 node_filler = "rp_default:swamp_dirt",
644 node_cave_liquid = "rp_default:swamp_water_source",
646 depth_filler = 5,
647 depth_top = 1,
649 y_min = 2,
650 y_max = SWAMP_Y_MAX,
652 heat_point = 12,
653 humidity_point = 83,
655 register_ocean_and_beach("Swamp Forest", "rp_default:swamp_dirt")
656 default.set_biome_info("Swamp Forest", "swampy")
658 minetest.register_biome(
660 name = "Dry Swamp",
662 node_top = "rp_default:dirt_with_swamp_grass",
663 node_filler = "rp_default:swamp_dirt",
665 depth_filler = 6,
666 depth_top = 1,
668 y_min = 2,
669 y_max = SWAMP_Y_MAX,
671 heat_point = 0,
672 humidity_point = 67,
674 register_ocean_and_beach("Dry Swamp", "rp_default:sand")
675 default.set_biome_info("Dry Swamp", "swampy")
677 minetest.register_biome(
679 name = "Papyrus Swamp",
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",
685 depth_filler = 4,
686 depth_top = 1,
688 y_min = 2,
689 y_max = SWAMP_Y_MAX,
691 heat_point = 49,
692 humidity_point = 89,
694 register_ocean_and_beach("Papyrus Swamp", "rp_default:sand")
695 default.set_biome_info("Papyrus Swamp", "swampy")
697 -- Special Underground biome
698 minetest.register_biome(
700 name = "Underground",
702 y_min = -31000,
703 y_max = UNDERGROUND_Y_MAX,
705 heat_point = 50,
706 humidity_point = 50,
708 default.set_biome_info("Underground", "undergroundy")
712 local function spring_ore_np(seed)
713 return {
714 offset = 0,
715 scale = 1,
716 spread = {x=250, y=250, z=250},
717 seed = seed or 12345,
718 octaves = 3,
719 persist = 0.6,
720 lacunarity = 2,
721 flags = "defaults",
725 -- Water
727 minetest.register_ore( -- Springs
729 ore_type = "blob",
730 ore = "rp_default:water_source",
731 wherein = "rp_default:dirt_with_grass",
732 biomes = {"Grassland"},
733 clust_scarcity = 26*26*26,
734 clust_num_ores = 1,
735 clust_size = 1,
736 y_min = 20,
737 y_max = 31000,
738 noise_params = spring_ore_np(),
741 minetest.register_ore( -- Pools
743 ore_type = "blob",
744 ore = "rp_default:water_source",
745 wherein = "rp_default:dirt_with_grass",
746 biomes = {"Wilderness"},
747 clust_scarcity = 32*32*32,
748 clust_num_ores = 20,
749 clust_size = 6,
750 y_min = 10,
751 y_max = 30,
752 noise_params = spring_ore_np(),
754 if mg_name ~= "v6" then
755 minetest.register_ore( -- Swamp (big springs)
757 ore_type = "blob",
758 ore = "rp_default:swamp_water_source",
759 wherein = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
760 biomes = {"Mixed Swamp", "Papyrus Swamp", "Swamp Forest", "Swamp Meadow"},
761 clust_scarcity = 7*7*7,
762 clust_num_ores = 10,
763 clust_size = 4,
764 y_min = -31000,
765 y_max = 31000,
766 noise_params = spring_ore_np(13943),
768 minetest.register_ore( -- Swamp (medium springs)
770 ore_type = "blob",
771 ore = "rp_default:swamp_water_source",
772 wherein = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
773 biomes = {"Mixed Swamp", "Papyrus Swamp", "Swamp Forest", "Swamp Meadow"},
774 clust_scarcity = 5*5*5,
775 clust_num_ores = 8,
776 clust_size = 2,
777 y_min = -31000,
778 y_max = 31000,
779 noise_params = spring_ore_np(49494),
782 minetest.register_ore( -- Swamp (small springs)
784 ore_type = "blob",
785 ore = "rp_default:swamp_water_source",
786 wherein = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
787 biomes = {"Mixed Swamp", "Papyrus Swamp", "Swamp Forest", "Swamp Meadow"},
788 clust_scarcity = 6*6*6,
789 clust_num_ores = 1,
790 clust_size = 1,
791 y_min = -31000,
792 y_max = 31000,
793 noise_params = spring_ore_np(59330),
796 minetest.register_ore( -- Marsh
798 ore_type = "blob",
799 ore = "rp_default:swamp_water_source",
800 wherein = {"rp_default:dirt_with_grass", "rp_default:dirt"},
801 biomes = {"Marsh"},
802 clust_scarcity = 8*8*8,
803 clust_num_ores = 10,
804 clust_size = 6,
805 y_min = -31000,
806 y_max = 31000,
807 noise_params = spring_ore_np(),
810 minetest.register_ore(
812 ore_type = "blob",
813 ore = "rp_default:gravel",
814 wherein = "rp_default:dry_dirt",
815 biomes = {"Rocky Dryland"},
816 clust_scarcity = 8*8*8,
817 clust_size = 8,
818 y_min = -31000,
819 y_max = 31000,
820 noise_params = {
821 octaves = 1,
822 scale = 1,
823 offset = 0,
824 spread = { x = 100, y = 100, z = 100 },
825 lacunarity = 2.0,
826 persistence = 0.5,
827 seed = 43400,
830 minetest.register_ore(
832 ore_type = "blob",
833 ore = "rp_default:stone",
834 wherein = "rp_default:dry_dirt",
835 biomes = {"Rocky Dryland"},
836 clust_scarcity = 8*8*8,
837 clust_size = 7,
838 y_min = -31000,
839 y_max = 31000,
840 noise_params = {
841 octaves = 1,
842 scale = 1,
843 offset = 0,
844 spread = { x = 100, y = 100, z = 100 },
845 lacunarity = 2.0,
846 persistence = 0.5,
847 seed = 13940,
851 minetest.register_ore( -- Dry Swamp (dirt)
853 ore_type = "blob",
854 ore = "rp_default:dirt_with_grass",
855 wherein = {"rp_default:dirt_with_swamp_grass"},
856 biomes = {"Dry Swamp"},
857 clust_scarcity = 3*3*3,
858 clust_num_ores = 10,
859 clust_size = 4,
860 y_min = -31000,
861 y_max = 31000,
862 noise_params = spring_ore_np(13943),
864 minetest.register_ore( -- Dry Swamp (dirt)
866 ore_type = "blob",
867 ore = "rp_default:dirt",
868 wherein = {"rp_default:swamp_dirt"},
869 biomes = {"Dry Swamp"},
870 clust_scarcity = 3*3*3,
871 clust_num_ores = 10,
872 clust_size = 4,
873 y_min = -31000,
874 y_max = 31000,
875 noise_params = spring_ore_np(13943),
877 minetest.register_ore(
879 ore_type = "scatter",
880 ore = "rp_default:dirt_with_dry_grass",
881 wherein = "rp_default:dry_dirt",
882 biomes = {"Savannic Wasteland"},
883 clust_scarcity = 6*6*6,
884 clust_size = 6,
885 clust_num_ores = 40,
886 y_min = 2,
887 y_max = 31000,
888 noise_params = {
889 octaves = 1,
890 scale = 1,
891 offset = 0.1,
892 spread = { x = 100, y = 100, z = 100 },
893 lacunarity = 2.0,
894 persistence = 0.5,
895 seed = 12449,
899 minetest.register_ore(
901 ore_type = "blob",
902 ore = "rp_default:dirt_with_dry_grass",
903 wherein = "rp_default:dry_dirt",
904 biomes = {"Savannic Wasteland"},
905 clust_scarcity = 7*7*7,
906 clust_size = 4,
907 y_min = 2,
908 y_max = 31000,
909 noise_params = {
910 octaves = 2,
911 scale = 1,
912 offset = 0.2,
913 spread = { x = 100, y = 100, z = 100 },
914 lacunarity = 2.0,
915 persistence = 0.5,
916 seed = 12450,
920 minetest.register_ore(
922 ore_type = "scatter",
923 ore = "rp_default:stone_with_sulfur",
924 wherein = "rp_default:stone",
925 biomes = { "Rocky Dryland", "Wooded Dryland"},
926 clust_scarcity = 9*9*9,
927 clust_num_ores = 1,
928 clust_size = 1,
929 y_min = -8,
930 y_max = 32,
937 --[[ DECORATIONS ]]
938 -- The decorations are roughly ordered by size;
939 -- largest decorations first.
941 -- Tree decorations
943 if mg_name ~= "v6" then
944 minetest.register_decoration(
946 deco_type = "schematic",
947 place_on = {"rp_default:dirt_with_grass"},
948 sidelen = 16,
949 fill_ratio = 0.004,
950 biomes = {"Forest"},
951 flags = "place_center_x, place_center_z",
952 replacements = {
953 ["default:leaves"] = "rp_default:leaves_birch",
954 ["default:tree"] = "rp_default:tree_birch",
955 ["default:apple"] = "air"
957 schematic = minetest.get_modpath("rp_default")
958 .. "/schematics/default_squaretree.mts",
959 y_min = -32000,
960 y_max = 32000,
963 minetest.register_decoration(
965 deco_type = "schematic",
966 place_on = {"rp_default:dirt_with_grass"},
967 sidelen = 16,
968 fill_ratio = 0.015,
969 biomes = {"Birch Forest"},
970 flags = "place_center_x, place_center_z",
971 replacements = {
972 ["default:leaves"] = "rp_default:leaves_birch",
973 ["default:tree"] = "rp_default:tree_birch",
974 ["default:apple"] = "air"
976 schematic = minetest.get_modpath("rp_default")
977 .. "/schematics/default_squaretree.mts",
978 y_min = -32000,
979 y_max = 32000,
982 minetest.register_decoration(
984 deco_type = "schematic",
985 place_on = {"rp_default:dirt_with_grass"},
986 sidelen = 16,
987 fill_ratio = 0.004,
988 biomes = {"Dry Swamp"},
989 flags = "place_center_x, place_center_z",
990 replacements = {
991 ["default:leaves"] = "rp_default:leaves_birch",
992 ["default:tree"] = "rp_default:tree_birch",
993 ["default:apple"] = "air"
995 schematic = minetest.get_modpath("rp_default")
996 .. "/schematics/default_squaretree.mts",
997 y_min = -32000,
998 y_max = 32000,
1002 minetest.register_decoration(
1004 deco_type = "schematic",
1005 place_on = {"rp_default:dirt_with_grass"},
1006 sidelen = 16,
1007 fill_ratio = 0.0001,
1008 biomes = {"Thorny Shrubs"},
1009 flags = "place_center_x, place_center_z",
1010 schematic = minetest.get_modpath("rp_default")
1011 .. "/schematics/default_appletree.mts",
1012 y_min = -32000,
1013 y_max = 32000,
1018 minetest.register_decoration(
1020 deco_type = "schematic",
1021 place_on = {"rp_default:dirt_with_grass"},
1022 sidelen = 16,
1023 fill_ratio = 0.007,
1024 biomes = {"Orchard"},
1025 flags = "place_center_x, place_center_z",
1026 schematic = minetest.get_modpath("rp_default")
1027 .. "/schematics/default_appletree.mts",
1028 y_min = 10,
1029 y_max = 32000,
1032 minetest.register_decoration(
1034 deco_type = "schematic",
1035 place_on = {"rp_default:dirt_with_grass"},
1036 sidelen = 16,
1037 fill_ratio = 0.009,
1038 biomes = {"Forest", "Deep Forest"},
1039 flags = "place_center_x, place_center_z",
1040 schematic = minetest.get_modpath("rp_default")
1041 .. "/schematics/default_appletree.mts",
1042 y_min = -32000,
1043 y_max = 32000,
1046 minetest.register_decoration(
1048 deco_type = "schematic",
1049 place_on = {"rp_default:dirt_with_grass"},
1050 sidelen = 16,
1051 fill_ratio = 0.008,
1052 biomes = {"Forest"},
1053 flags = "place_center_x, place_center_z",
1054 schematic = minetest.get_modpath("rp_default")
1055 .. "/schematics/default_megatree.mts",
1056 y_min = -32000,
1057 y_max = 32000,
1060 minetest.register_decoration(
1062 name = "rp_default:gigatree",
1063 deco_type = "schematic",
1064 place_on = {"rp_default:dirt_with_grass"},
1065 sidelen = 16,
1066 fill_ratio = 0.023,
1067 biomes = {"Deep Forest"},
1068 flags = "place_center_x, place_center_z",
1069 schematic = minetest.get_modpath("rp_default")
1070 .. "/schematics/default_gigatree.mts",
1071 y_min = -32000,
1072 y_max = 32000,
1075 minetest.register_decoration(
1077 deco_type = "schematic",
1078 place_on = {"rp_default:dirt_with_grass"},
1079 sidelen = 16,
1080 fill_ratio = 0.0009,
1081 biomes = {"Oak Forest"},
1082 flags = "place_center_x, place_center_z",
1083 schematic = minetest.get_modpath("rp_default")
1084 .. "/schematics/rp_default_oak_tree_big_1.mts",
1085 y_min = 1,
1086 y_max = 32000,
1089 minetest.register_decoration(
1091 deco_type = "schematic",
1092 place_on = {"rp_default:dirt_with_grass"},
1093 sidelen = 16,
1094 fill_ratio = 0.0045,
1095 biomes = {"Tall Oak Forest"},
1096 flags = "place_center_x, place_center_z",
1097 schematic = minetest.get_modpath("rp_default")
1098 .. "/schematics/rp_default_oak_tree_big_1.mts",
1099 y_min = 1,
1100 y_max = 32000,
1102 minetest.register_decoration(
1104 deco_type = "schematic",
1105 place_on = {"rp_default:dirt_with_grass"},
1106 sidelen = 16,
1107 fill_ratio = 0.0045,
1108 biomes = {"Tall Oak Forest"},
1109 flags = "place_center_x, place_center_z",
1110 schematic = minetest.get_modpath("rp_default")
1111 .. "/schematics/rp_default_oak_tree_big_2.mts",
1112 y_min = 1,
1113 y_max = 32000,
1117 minetest.register_decoration(
1119 deco_type = "schematic",
1120 place_on = {"rp_default:dirt_with_grass"},
1121 sidelen = 16,
1122 fill_ratio = 0.035,
1123 biomes = {"Dense Oak Forest"},
1124 flags = "place_center_x, place_center_z",
1125 schematic = minetest.get_modpath("rp_default")
1126 .. "/schematics/rp_default_oak_tree_big_1.mts",
1127 y_min = 1,
1128 y_max = 32000,
1130 minetest.register_decoration(
1132 deco_type = "schematic",
1133 place_on = {"rp_default:dirt_with_grass"},
1134 sidelen = 16,
1135 fill_ratio = 0.035,
1136 biomes = {"Dense Oak Forest"},
1137 flags = "place_center_x, place_center_z",
1138 schematic = minetest.get_modpath("rp_default")
1139 .. "/schematics/rp_default_oak_tree_big_2.mts",
1140 y_min = 1,
1141 y_max = 32000,
1146 minetest.register_decoration(
1148 deco_type = "schematic",
1149 place_on = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
1150 sidelen = 16,
1151 fill_ratio = 0.0008,
1152 biomes = {"Mixed Swamp"},
1153 flags = "place_center_x, place_center_z",
1154 schematic = minetest.get_modpath("rp_default")
1155 .. "/schematics/rp_default_swamp_oak.mts",
1156 y_min = -32000,
1157 y_max = 32000,
1160 minetest.register_decoration(
1162 deco_type = "schematic",
1163 place_on = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
1164 sidelen = 16,
1165 fill_ratio = 0.006,
1166 biomes = {"Swamp Forest"},
1167 flags = "place_center_x, place_center_z",
1168 schematic = minetest.get_modpath("rp_default")
1169 .. "/schematics/rp_default_swamp_oak.mts",
1170 y_min = -32000,
1171 y_max = 32000,
1174 minetest.register_decoration(
1176 deco_type = "schematic",
1177 place_on = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
1178 sidelen = 16,
1179 fill_ratio = 0.0001,
1180 biomes = {"Swamp Forest"},
1181 flags = "place_center_x, place_center_z",
1182 schematic = minetest.get_modpath("rp_default")
1183 .. "/schematics/rp_default_swamp_birch.mts",
1184 y_min = -32000,
1185 y_max = 32000,
1187 minetest.register_decoration(
1189 deco_type = "schematic",
1190 place_on = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
1191 sidelen = 16,
1192 fill_ratio = 0.003,
1193 biomes = {"Dry Swamp"},
1194 flags = "place_center_x, place_center_z",
1195 schematic = minetest.get_modpath("rp_default")
1196 .. "/schematics/rp_default_swamp_birch.mts",
1197 y_min = -32000,
1198 y_max = 32000,
1203 local MYSTERY_FOREST_SPREAD = { x=500, y=500, z=500 }
1204 local MYSTERY_FOREST_OFFSET = 0.001
1205 local MYSTERY_FOREST_OFFSET_STAIRCASE = -0.001
1206 local MYSTERY_FOREST_OFFSET_APPLES = -0.0005
1207 local MYSTERY_FOREST_SCALE = 0.008
1209 minetest.register_decoration(
1211 deco_type = "schematic",
1212 place_on = {"rp_default:dirt_with_grass"},
1213 sidelen = 16,
1214 biomes = {"Mystery Forest"},
1215 flags = "place_center_x, place_center_z",
1216 schematic = minetest.get_modpath("rp_default")
1217 .. "/schematics/rp_default_staircase_tree.mts",
1218 y_min = 1,
1219 y_max = 32000,
1220 noise_params = {
1221 octaves = 2,
1222 scale = -MYSTERY_FOREST_SCALE,
1223 offset = MYSTERY_FOREST_OFFSET_STAIRCASE,
1224 spread = MYSTERY_FOREST_SPREAD,
1225 lacunarity = 2.0,
1226 persistence = 0.5,
1227 seed = 49204,
1231 minetest.register_decoration(
1233 deco_type = "schematic",
1234 place_on = {"rp_default:dirt_with_grass"},
1235 sidelen = 16,
1236 biomes = {"Mystery Forest"},
1237 flags = "place_center_x, place_center_z",
1238 schematic = minetest.get_modpath("rp_default")
1239 .. "/schematics/rp_default_layer_birch.mts",
1240 y_min = 1,
1241 y_max = 32000,
1242 noise_params = {
1243 octaves = 2,
1244 scale = MYSTERY_FOREST_SCALE,
1245 offset = MYSTERY_FOREST_OFFSET,
1246 spread = MYSTERY_FOREST_SPREAD,
1247 lacunarity = 2.0,
1248 persistence = 0.5,
1249 seed = 49204,
1253 minetest.register_decoration(
1255 deco_type = "schematic",
1256 place_on = {"rp_default:dirt_with_grass"},
1257 sidelen = 16,
1258 biomes = {"Mystery Forest"},
1259 flags = "place_center_x, place_center_z",
1260 schematic = minetest.get_modpath("rp_default")
1261 .. "/schematics/rp_default_telephone_tree.mts",
1262 y_min = 1,
1263 y_max = 32000,
1264 noise_params = {
1265 octaves = 2,
1266 scale = -MYSTERY_FOREST_SCALE,
1267 offset = MYSTERY_FOREST_OFFSET,
1268 spread = MYSTERY_FOREST_SPREAD,
1269 lacunarity = 2.0,
1270 persistence = 0.5,
1271 seed = 49204,
1275 minetest.register_decoration(
1277 deco_type = "schematic",
1278 place_on = {"rp_default:dirt_with_grass"},
1279 sidelen = 16,
1280 biomes = {"Mystery Forest"},
1281 flags = "place_center_x, place_center_z",
1282 schematic = minetest.get_modpath("rp_default")
1283 .. "/schematics/rp_default_telephone_tree_apples.mts",
1284 y_min = 1,
1285 y_max = 32000,
1286 noise_params = {
1287 octaves = 2,
1288 scale = -MYSTERY_FOREST_SCALE,
1289 offset = MYSTERY_FOREST_OFFSET_APPLES,
1290 spread = MYSTERY_FOREST_SPREAD,
1291 lacunarity = 2.0,
1292 persistence = 0.5,
1293 seed = 49204,
1300 minetest.register_decoration(
1302 deco_type = "schematic",
1303 place_on = {"rp_default:dirt_with_grass"},
1304 sidelen = 16,
1305 biomes = {"Mystery Forest"},
1306 flags = "place_center_x, place_center_z",
1307 schematic = minetest.get_modpath("rp_default")
1308 .. "/schematics/rp_default_cross_birch.mts",
1309 y_min = 1,
1310 y_max = 32000,
1311 noise_params = {
1312 octaves = 2,
1313 scale = MYSTERY_FOREST_SCALE,
1314 offset = MYSTERY_FOREST_OFFSET,
1315 spread = MYSTERY_FOREST_SPREAD,
1316 lacunarity = 2.0,
1317 persistence = 0.5,
1318 seed = 49204,
1322 minetest.register_decoration(
1324 deco_type = "schematic",
1325 place_on = {"rp_default:dirt_with_grass"},
1326 sidelen = 16,
1327 biomes = {"Poplar Plains"},
1328 flags = "place_center_x, place_center_z",
1329 schematic = minetest.get_modpath("rp_default")
1330 .. "/schematics/rp_default_poplar_large.mts",
1331 y_min = 1,
1332 y_max = 32000,
1333 noise_params = {
1334 octaves = 2,
1335 scale = 0.01,
1336 offset = -0.004,
1337 spread = {x=50,y=50,z=50},
1338 lacunarity = 2.0,
1339 persistence = 0.5,
1340 seed = 94325,
1343 minetest.register_decoration(
1345 deco_type = "schematic",
1346 place_on = {"rp_default:dirt_with_grass"},
1347 sidelen = 16,
1348 biomes = {"Poplar Plains"},
1349 flags = "place_center_x, place_center_z",
1350 schematic = minetest.get_modpath("rp_default")
1351 .. "/schematics/rp_default_poplar_small.mts",
1352 y_min = 1,
1353 y_max = 32000,
1354 noise_params = {
1355 octaves = 2,
1356 scale = 0.01,
1357 offset = -0.001,
1358 spread = {x=50,y=50,z=50},
1359 lacunarity = 2.0,
1360 persistence = 0.5,
1361 seed = 94325,
1364 minetest.register_decoration(
1366 deco_type = "schematic",
1367 place_on = {"rp_default:dirt_with_grass"},
1368 fill_ratio = 0.0002,
1369 sidelen = 16,
1370 biomes = {"Poplar Plains"},
1371 flags = "place_center_x, place_center_z",
1372 schematic = minetest.get_modpath("rp_default")
1373 .. "/schematics/rp_default_poplar_small.mts",
1374 y_min = 1,
1375 y_max = 32000,
1378 -- Small poplar tree blobs
1379 minetest.register_decoration(
1381 deco_type = "schematic",
1382 place_on = {"rp_default:dirt_with_grass"},
1383 sidelen = 8,
1384 biomes = {"Baby Poplar Plains"},
1385 flags = "place_center_x, place_center_z",
1386 schematic = minetest.get_modpath("rp_default")
1387 .. "/schematics/rp_default_poplar_small.mts",
1388 y_min = 1,
1389 y_max = 32000,
1390 noise_params = {
1391 octaves = 2,
1392 scale = 0.05,
1393 offset = -0.032,
1394 spread = {x=24,y=24,z=24},
1395 lacunarity = 2.0,
1396 persistence = 0.5,
1397 seed = 94325,
1401 -- Occasional lonely poplars
1402 minetest.register_decoration(
1404 deco_type = "schematic",
1405 place_on = {"rp_default:dirt_with_grass"},
1406 sidelen = 16,
1407 fill_ratio = 0.0002,
1408 biomes = {"Baby Poplar Plains"},
1409 flags = "place_center_x, place_center_z",
1410 schematic = minetest.get_modpath("rp_default")
1411 .. "/schematics/rp_default_poplar_small.mts",
1412 y_min = 1,
1413 y_max = 32000,
1416 minetest.register_decoration(
1418 deco_type = "schematic",
1419 place_on = {"rp_default:dirt_with_grass"},
1420 sidelen = 16,
1421 biomes = {"Baby Poplar Plains"},
1422 flags = "place_center_x, place_center_z",
1423 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_bush.mts",
1424 y_min = 1,
1425 y_max = 32000,
1426 rotation = "0",
1427 noise_params = {
1428 octaves = 1,
1429 scale = 0.001,
1430 offset = -0.0000001,
1431 spread = { x = 50, y = 50, z = 50 },
1432 lacunarity = 2.0,
1433 persistence = 0.5,
1434 seed = 98421,
1438 minetest.register_decoration(
1440 deco_type = "schematic",
1441 place_on = {"rp_default:dirt_with_grass"},
1442 sidelen = 16,
1443 biomes = {"Thorny Shrubs"},
1444 flags = "place_center_x, place_center_z",
1445 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_bush.mts",
1446 y_min = 3,
1447 y_max = 32000,
1448 rotation = "0",
1449 noise_params = {
1450 octaves = 1,
1451 scale = -0.004,
1452 offset = 0.002,
1453 spread = { x = 82, y = 82, z = 82 },
1454 lacunarity = 2.0,
1455 persistence = 0.5,
1456 seed = 43905,
1460 minetest.register_decoration(
1462 deco_type = "schematic",
1463 place_on = {"rp_default:dirt_with_grass"},
1464 sidelen = 16,
1465 fill_ratio = 0.006,
1466 biomes = {"Shrubbery"},
1467 flags = "place_center_x, place_center_z",
1468 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_bush.mts",
1469 y_min = 1,
1470 y_max = 32000,
1471 rotation = "0",
1475 minetest.register_decoration(
1477 deco_type = "schematic",
1478 place_on = {"rp_default:dirt_with_grass"},
1479 sidelen = 16,
1480 fill_ratio = 0.004,
1481 biomes = {"Grove"},
1482 flags = "place_center_x, place_center_z",
1483 schematic = minetest.get_modpath("rp_default")
1484 .. "/schematics/default_talltree.mts",
1485 y_min = 0,
1486 y_max = 32000,
1489 minetest.register_decoration(
1491 deco_type = "schematic",
1492 place_on = {"rp_default:dirt_with_grass"},
1493 sidelen = 16,
1494 fill_ratio = 0.015,
1495 biomes = {"Tall Birch Forest"},
1496 flags = "place_center_x, place_center_z",
1497 schematic = minetest.get_modpath("rp_default")
1498 .. "/schematics/rp_default_birch_tall.mts",
1499 y_min = -32000,
1500 y_max = 32000,
1503 minetest.register_decoration(
1505 deco_type = "schematic",
1506 place_on = {"rp_default:dirt_with_grass"},
1507 sidelen = 16,
1508 fill_ratio = 0.004,
1509 biomes = {"Wilderness"},
1510 flags = "place_center_x, place_center_z",
1511 replacements = {
1512 ["default:apple"] = "air",
1514 schematic = minetest.get_modpath("rp_default")
1515 .. "/schematics/default_appletree.mts",
1516 y_min = -32000,
1517 y_max = 32000,
1520 minetest.register_decoration(
1522 deco_type = "schematic",
1523 place_on = {"rp_default:dirt_with_grass", "rp_default:dirt"},
1524 sidelen = 16,
1525 fill_ratio = 0.0001,
1526 biomes = {"Dry Swamp"},
1527 flags = "place_center_x, place_center_z",
1528 schematic = minetest.get_modpath("rp_default")
1529 .. "/schematics/default_appletree.mts",
1530 y_min = -32000,
1531 y_max = 32000,
1534 minetest.register_decoration(
1536 deco_type = "schematic",
1537 place_on = {"rp_default:dirt_with_grass"},
1538 sidelen = 16,
1539 fill_ratio = 0.004,
1540 biomes = {"Wilderness"},
1541 flags = "place_center_x, place_center_z",
1542 schematic = minetest.get_modpath("rp_default")
1543 .. "/schematics/default_oaktree.mts",
1544 y_min = -32000,
1545 y_max = 32000,
1549 minetest.register_decoration(
1551 deco_type = "schematic",
1552 place_on = {"rp_default:dirt_with_grass"},
1553 sidelen = 16,
1554 fill_ratio = 0.001,
1555 biomes = {"Oak Shrubbery"},
1556 flags = "place_center_x, place_center_z",
1557 schematic = minetest.get_modpath("rp_default")
1558 .. "/schematics/default_oaktree.mts",
1559 y_min = 1,
1560 y_max = 32000,
1563 minetest.register_decoration(
1565 deco_type = "schematic",
1566 place_on = {"rp_default:dirt_with_grass"},
1567 sidelen = 16,
1568 fill_ratio = 0.02,
1569 biomes = {"Dense Oak Forest"},
1570 flags = "place_center_x, place_center_z",
1571 schematic = minetest.get_modpath("rp_default")
1572 .. "/schematics/default_oaktree.mts",
1573 y_min = 1,
1574 y_max = 32000,
1577 minetest.register_decoration(
1579 deco_type = "schematic",
1580 place_on = {"rp_default:dirt_with_grass"},
1581 sidelen = 16,
1582 fill_ratio = 0.0225,
1583 biomes = {"Oak Forest"},
1584 flags = "place_center_x, place_center_z",
1585 schematic = minetest.get_modpath("rp_default")
1586 .. "/schematics/default_oaktree.mts",
1587 y_min = 1,
1588 y_max = 32000,
1591 minetest.register_decoration(
1593 deco_type = "schematic",
1594 place_on = {"rp_default:dirt_with_grass"},
1595 sidelen = 16,
1596 fill_ratio = 0.0015,
1597 biomes = {"Tall Oak Forest"},
1598 flags = "place_center_x, place_center_z",
1599 schematic = minetest.get_modpath("rp_default")
1600 .. "/schematics/default_oaktree.mts",
1601 y_min = 1,
1602 y_max = 32000,
1609 -- Cactus decorations
1611 minetest.register_decoration(
1613 deco_type = "schematic",
1614 place_on = {"rp_default:sand"},
1615 sidelen = 16,
1616 fill_ratio = 0.004,
1617 biomes = {"Desert"},
1618 flags = "place_center_x, place_center_z",
1619 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_cactus.mts",
1620 y_min = 10,
1621 y_max = 500,
1622 rotation = "random",
1625 -- Rock decorations
1627 minetest.register_decoration(
1629 deco_type = "schematic",
1630 place_on = {"rp_default:dry_dirt"},
1631 sidelen = 16,
1632 fill_ratio = 0.006,
1633 biomes = {"Wasteland"},
1634 flags = "place_center_x, place_center_z",
1635 schematic = minetest.get_modpath("rp_default")
1636 .. "/schematics/default_small_rock.mts",
1637 replacements = {["default:dirt"] = "rp_default:dry_dirt"},
1638 y_min = 1,
1639 y_max = 32000,
1640 rotation = "random",
1643 minetest.register_decoration(
1645 deco_type = "schematic",
1646 place_on = {"rp_default:dry_dirt"},
1647 sidelen = 16,
1648 fill_ratio = 0.004,
1649 biomes = {"Wasteland"},
1650 flags = "place_center_x, place_center_z",
1651 schematic = minetest.get_modpath("rp_default")
1652 .. "/schematics/default_large_rock.mts",
1653 replacements = {["default:dirt"] = "rp_default:dry_dirt"},
1654 y_min = 1,
1655 y_max = 32000,
1656 rotation = "random",
1659 minetest.register_decoration(
1661 deco_type = "schematic",
1662 place_on = {"rp_default:stone", "rp_default:dry_dirt"},
1663 sidelen = 16,
1664 fill_ratio = 0.003,
1665 biomes = {"Rocky Dryland"},
1666 flags = "place_center_x, place_center_z",
1667 schematic = minetest.get_modpath("rp_default")
1668 .. "/schematics/default_small_rock.mts",
1669 replacements = {["default:dirt"] = "rp_default:dry_dirt"},
1670 y_min = 1,
1671 y_max = 32000,
1672 rotation = "random",
1675 minetest.register_decoration(
1677 deco_type = "schematic",
1678 place_on = {"rp_default:dry_dirt", "rp_default:dirt_with_dry_grass"},
1679 sidelen = 16,
1680 fill_ratio = 0.001,
1681 biomes = {"Savannic Wasteland"},
1682 flags = "place_center_x, place_center_z",
1683 schematic = minetest.get_modpath("rp_default")
1684 .. "/schematics/default_small_rock.mts",
1685 replacements = {["default:dirt"] = "rp_default:dry_dirt"},
1686 y_min = 1,
1687 y_max = 32000,
1688 rotation = "random",
1692 -- Sulfur decorations
1694 minetest.register_decoration(
1696 deco_type = "simple",
1697 place_on = "rp_default:dry_dirt",
1698 sidelen = 16,
1699 fill_ratio = 0.005,
1700 biomes = {"Wasteland"},
1701 decoration = {"rp_default:stone_with_sulfur"},
1702 y_min = 2,
1703 y_max = 14,
1706 -- Tiny tree decorations
1708 minetest.register_decoration(
1710 deco_type = "schematic",
1711 place_on = {"rp_default:dry_dirt"},
1712 sidelen = 16,
1713 fill_ratio = 0.0001,
1714 biomes = {"Rocky Dryland"},
1715 flags = "place_center_x, place_center_z",
1716 schematic = minetest.get_modpath("rp_default")
1717 .. "/schematics/rp_default_tiny_birch.mts",
1718 y_min = 1,
1719 y_max = 32000,
1722 minetest.register_decoration(
1724 deco_type = "schematic",
1725 place_on = {"rp_default:dry_dirt"},
1726 sidelen = 16,
1727 fill_ratio = 0.00025,
1728 biomes = {"Rocky Dryland"},
1729 flags = "place_center_x, place_center_z",
1730 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_3layer.mts",
1731 y_min = 3,
1732 y_max = 32000,
1734 minetest.register_decoration(
1736 deco_type = "schematic",
1737 place_on = {"rp_default:dry_dirt"},
1738 sidelen = 16,
1739 fill_ratio = 0.00025,
1740 biomes = {"Rocky Dryland"},
1741 flags = "place_center_x, place_center_z",
1742 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_2layer.mts",
1743 y_min = 3,
1744 y_max = 32000,
1746 minetest.register_decoration(
1748 deco_type = "schematic",
1749 place_on = {"rp_default:dry_dirt"},
1750 sidelen = 16,
1751 fill_ratio = 0.002,
1752 biomes = {"Rocky Dryland"},
1753 flags = "place_center_x, place_center_z",
1754 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
1755 y_min = 3,
1756 y_max = 32000,
1758 minetest.register_decoration(
1760 deco_type = "schematic",
1761 place_on = {"rp_default:dry_dirt"},
1762 sidelen = 16,
1763 fill_ratio = 0.0001,
1764 biomes = {"Rocky Dryland"},
1765 flags = "place_center_x, place_center_z",
1766 schematic = minetest.get_modpath("rp_default")
1767 .. "/schematics/rp_default_tiny_birch.mts",
1768 y_min = 1,
1769 y_max = 32000,
1772 minetest.register_decoration(
1774 deco_type = "schematic",
1775 place_on = {"rp_default:dry_dirt"},
1776 sidelen = 16,
1777 fill_ratio = 0.00025,
1778 biomes = {"Rocky Dryland"},
1779 flags = "place_center_x, place_center_z",
1780 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_3layer.mts",
1781 y_min = 3,
1782 y_max = 32000,
1784 minetest.register_decoration(
1786 deco_type = "schematic",
1787 place_on = {"rp_default:dry_dirt"},
1788 sidelen = 16,
1789 fill_ratio = 0.00025,
1790 biomes = {"Rocky Dryland"},
1791 flags = "place_center_x, place_center_z",
1792 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_2layer.mts",
1793 y_min = 3,
1794 y_max = 32000,
1796 minetest.register_decoration(
1798 deco_type = "schematic",
1799 place_on = {"rp_default:dry_dirt"},
1800 sidelen = 16,
1801 fill_ratio = 0.002,
1802 biomes = {"Rocky Dryland"},
1803 flags = "place_center_x, place_center_z",
1804 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
1805 y_min = 3,
1806 y_max = 32000,
1809 minetest.register_decoration(
1811 deco_type = "schematic",
1812 place_on = {"rp_default:dry_dirt"},
1813 sidelen = 16,
1814 fill_ratio = 0.003,
1815 biomes = {"Wooded Dryland"},
1816 flags = "place_center_x, place_center_z",
1817 schematic = minetest.get_modpath("rp_default")
1818 .. "/schematics/rp_default_tiny_oak.mts",
1819 y_min = 1,
1820 y_max = 32000,
1823 minetest.register_decoration(
1825 deco_type = "schematic",
1826 place_on = {"rp_default:dry_dirt"},
1827 sidelen = 16,
1828 fill_ratio = 0.001,
1829 biomes = {"Wooded Dryland"},
1830 flags = "place_center_x, place_center_z",
1831 schematic = minetest.get_modpath("rp_default")
1832 .. "/schematics/rp_default_tiny_birch.mts",
1833 y_min = 1,
1834 y_max = 32000,
1838 minetest.register_decoration(
1840 deco_type = "schematic",
1841 place_on = {"rp_default:dry_dirt"},
1842 sidelen = 16,
1843 fill_ratio = 0.0002,
1844 biomes = {"Savannic Wasteland"},
1845 flags = "place_center_x, place_center_z",
1846 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
1847 y_min = 3,
1848 y_max = 32000,
1853 -- Bush/shrub decorations
1855 minetest.register_decoration(
1857 deco_type = "schematic",
1858 place_on = {"rp_default:dirt_with_grass"},
1859 sidelen = 16,
1860 fill_ratio = 0.0075,
1861 biomes = {"Oak Shrubbery"},
1862 flags = "place_center_x, place_center_z",
1863 schematic = minetest.get_modpath("rp_default")
1864 .. "/schematics/rp_default_oak_bush_wide.mts",
1865 y_min = 1,
1866 y_max = 32000,
1869 minetest.register_decoration(
1871 deco_type = "schematic",
1872 place_on = {"rp_default:dirt_with_grass"},
1873 sidelen = 16,
1874 fill_ratio = 0.03,
1875 biomes = {"Dense Oak Forest"},
1876 flags = "place_center_x, place_center_z",
1877 schematic = minetest.get_modpath("rp_default")
1878 .. "/schematics/rp_default_oak_bush_wide.mts",
1879 y_min = 1,
1880 y_max = 32000,
1883 minetest.register_decoration(
1885 deco_type = "schematic",
1886 place_on = {"rp_default:dirt_with_grass"},
1887 sidelen = 16,
1888 fill_ratio = 0.001,
1889 biomes = {"Oak Forest"},
1890 flags = "place_center_x, place_center_z",
1891 schematic = minetest.get_modpath("rp_default")
1892 .. "/schematics/rp_default_oak_bush_wide.mts",
1893 y_min = 1,
1894 y_max = 32000,
1897 minetest.register_decoration(
1899 deco_type = "schematic",
1900 place_on = {"rp_default:dirt_with_dry_grass"},
1901 sidelen = 16,
1902 fill_ratio = 0.005,
1903 biomes = {"Savanna", "Chaparral"},
1904 flags = "place_center_x, place_center_z",
1905 replacements = {["default:leaves"] = "rp_default:dry_leaves"},
1906 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_shrub.mts",
1907 y_min = 3,
1908 y_max = 32000,
1909 rotation = "0",
1912 minetest.register_decoration(
1914 deco_type = "schematic",
1915 place_on = {"rp_default:dirt_with_dry_grass"},
1916 sidelen = 16,
1917 fill_ratio = 0.0025,
1918 biomes = {"Savannic Wasteland"},
1919 flags = "place_center_x, place_center_z",
1920 replacements = {["default:leaves"] = "rp_default:dry_leaves"},
1921 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_shrub.mts",
1922 y_min = 3,
1923 y_max = 32000,
1924 rotation = "0",
1927 minetest.register_decoration(
1929 deco_type = "schematic",
1930 place_on = {"rp_default:dry_dirt"},
1931 sidelen = 16,
1932 fill_ratio = 0.001,
1933 biomes = {"Rocky Dryland", "Wooded Dryland"},
1934 flags = "place_center_x, place_center_z",
1935 replacements = {["default:leaves"] = "rp_default:dry_leaves"},
1936 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_shrub.mts",
1937 y_min = 3,
1938 y_max = 32000,
1941 minetest.register_decoration(
1943 deco_type = "schematic",
1944 place_on = {"rp_default:dirt_with_dry_grass"},
1945 sidelen = 16,
1946 fill_ratio = 0.06,
1947 biomes = {"Chaparral"},
1948 flags = "place_center_x, place_center_z",
1949 replacements = {["default:leaves"] = "rp_default:dry_leaves"},
1950 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_dry_bush.mts",
1951 y_min = 0,
1952 y_max = 32000,
1953 rotation = "0",
1955 minetest.register_decoration(
1957 deco_type = "schematic",
1958 place_on = {"rp_default:dirt_with_grass"},
1959 sidelen = 16,
1960 biomes = {"Thorny Shrubs"},
1961 flags = "place_center_x, place_center_z",
1962 replacements = {["default:leaves"] = "rp_default:dry_leaves"},
1963 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_dry_bush.mts",
1964 y_min = 5,
1965 y_max = 32000,
1966 rotation = "0",
1967 noise_params = {
1968 octaves = 1,
1969 scale = -0.004,
1970 offset = -0.001,
1971 spread = { x = 82, y = 82, z = 82 },
1972 lacunarity = 2.0,
1973 persistence = 0.5,
1974 seed = 493421,
1979 minetest.register_decoration(
1981 deco_type = "schematic",
1982 place_on = {"rp_default:dirt_with_grass"},
1983 sidelen = 16,
1984 fill_ratio = 0.0003,
1985 biomes = {"Oak Shrubbery"},
1986 flags = "place_center_x, place_center_z",
1987 schematic = minetest.get_modpath("rp_default")
1988 .. "/schematics/rp_default_normal_bush_small.mts",
1989 y_min = 1,
1990 y_max = 32000,
1993 minetest.register_decoration(
1995 deco_type = "schematic",
1996 place_on = {"rp_default:dirt_with_grass"},
1997 sidelen = 16,
1998 fill_ratio = 0.006,
1999 biomes = {"Shrubbery"},
2000 flags = "place_center_x, place_center_z",
2001 schematic = minetest.get_modpath("rp_default")
2002 .. "/schematics/rp_default_normal_bush_small.mts",
2003 y_min = 1,
2004 y_max = 32000,
2009 minetest.register_decoration(
2011 deco_type = "schematic",
2012 place_on = {"rp_default:dirt_with_grass"},
2013 sidelen = 16,
2014 fill_ratio = 0.004,
2015 biomes = {"Wilderness", "Grove"},
2016 flags = "place_center_x, place_center_z",
2017 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_bush.mts",
2018 y_min = 3,
2019 y_max = 32000,
2020 rotation = "0",
2023 -- Thistle decorations
2025 minetest.register_decoration(
2027 deco_type = "simple",
2028 place_on = "rp_default:dirt_with_grass",
2029 sidelen = 16,
2030 fill_ratio = 0.024,
2031 biomes = {"Wilderness"},
2032 decoration = {"rp_default:thistle"},
2033 height = 2,
2034 y_min = -32000,
2035 y_max = 32000,
2037 minetest.register_decoration(
2039 deco_type = "simple",
2040 place_on = {"rp_default:dirt_with_grass", "rp_default:dry_dirt"},
2041 sidelen = 4,
2042 biomes = {"Thorny Shrubs"},
2043 decoration = {"rp_default:thistle"},
2044 height = 2,
2045 y_min = -32000,
2046 y_max = 32000,
2047 noise_params = {
2048 octaves = 2,
2049 scale = 1,
2050 offset = -0.5,
2051 spread = { x = 12, y = 12, z = 12 },
2052 lacunarity = 2.0,
2053 persistence = 0.5,
2054 seed = 43905,
2057 -- Papyrus decorations
2059 -- Beach papyrus
2060 minetest.register_decoration(
2062 deco_type = "simple",
2063 place_on = {"rp_default:sand", "rp_default:dirt", "rp_default:dirt_with_grass"},
2064 spawn_by = {"rp_default:water_source", "rp_default:water_flowing"},
2065 num_spawn_by = 1,
2066 sidelen = 16,
2067 fill_ratio = 0.08,
2068 biomes = {"Grassland Ocean", "Grassland", "Forest Ocean", "Forest", "Wilderness Ocean", "Wilderness", "Birch Forest Ocean", "Tall Birch Forest Ocean"},
2069 decoration = {"rp_default:papyrus"},
2070 height = 2,
2071 y_max = 3,
2072 y_min = 0,
2075 -- Grassland papyrus
2076 minetest.register_decoration(
2078 deco_type = "simple",
2079 place_on = {"rp_default:dirt_with_grass"},
2080 spawn_by = {"group:water"},
2081 num_spawn_by = 1,
2082 sidelen = 16,
2083 fill_ratio = 0.08,
2084 biomes = {"Grassland", "Marsh", "Forest", "Deep Forest", "Wilderness", "Baby Poplar Plains"},
2085 decoration = {"rp_default:papyrus"},
2086 height = 2,
2087 height_max = 3,
2088 y_max = 30,
2089 y_min = 4,
2093 -- Swamp papyrus
2094 minetest.register_decoration(
2096 deco_type = "simple",
2097 place_on = {"rp_default:swamp_dirt", "rp_default:dirt_with_swamp_grass"},
2098 spawn_by = {"group:water"},
2099 num_spawn_by = 1,
2100 sidelen = 16,
2101 fill_ratio = 0.30,
2102 biomes = {"Mixed Swamp"},
2103 decoration = {"rp_default:papyrus"},
2104 height = 3,
2105 height_max = 4,
2106 y_max = 31000,
2107 y_min = -100,
2110 minetest.register_decoration(
2112 deco_type = "simple",
2113 place_on = {"rp_default:swamp_dirt", "rp_default:dirt_with_swamp_grass"},
2114 spawn_by = {"group:water"},
2115 num_spawn_by = 1,
2116 sidelen = 16,
2117 fill_ratio = 0.60,
2118 biomes = {"Papyrus Swamp"},
2119 decoration = {"rp_default:papyrus"},
2120 height = 4,
2121 height_max = 4,
2122 y_max = 31000,
2123 y_min = -100,
2126 -- Flower decorations
2128 minetest.register_decoration(
2130 deco_type = "simple",
2131 place_on = "rp_default:dirt_with_grass",
2132 sidelen = 16,
2133 fill_ratio = 0.04,
2134 biomes = {"Grassland", "Wilderness", "Orchard", "Baby Poplar Plains"},
2135 decoration = {"rp_default:flower"},
2136 y_min = -32000,
2137 y_max = 32000,
2140 -- Grass decorations
2142 if mg_name ~= "v6" then
2143 minetest.register_decoration(
2145 deco_type = "simple",
2146 place_on = "rp_default:dirt_with_grass",
2147 sidelen = 16,
2148 fill_ratio = 0.18,
2149 biomes = {"Grassland", "Orchard", "Swamp Meadow", "Baby Poplar Plains", "Poplar Plains", "Shrubbery", "Oak Shrubbery", "Thorny Shrubs", "Dry Swamp"},
2150 decoration = {"rp_default:grass"},
2151 y_min = 10,
2152 y_max = 32000,
2156 minetest.register_decoration(
2158 deco_type = "simple",
2159 place_on = "rp_default:dirt_with_swamp_grass",
2160 sidelen = 16,
2161 fill_ratio = 0.04,
2162 biomes = {"Mixed Swamp", "Dry Swamp", "Swamp Meadow", "Swamp Papyrus", "Swamp Forest"},
2163 decoration = {"rp_default:swamp_grass"},
2164 y_min = 2,
2165 y_max = 40,
2168 minetest.register_decoration(
2170 deco_type = "simple",
2171 place_on = "rp_default:dirt_with_dry_grass",
2172 sidelen = 16,
2173 fill_ratio = 0.07,
2174 biomes = {"Desert", "Savanna", "Chaparral", "Savannic Wasteland"},
2175 decoration = {"rp_default:dry_grass"},
2176 y_min = 10,
2177 y_max = 500,
2180 if mg_name ~= "v6" then
2181 minetest.register_decoration(
2183 deco_type = "simple",
2184 place_on = "rp_default:dirt_with_grass",
2185 sidelen = 16,
2186 fill_ratio = 0.08,
2187 biomes = {"Forest", "Deep Forest", "Birch Forest", "Tall Birch Forest", "Oak Forest", "Dense Oak Forest", "Tall Oak Forest", "Mystery Forest"},
2188 decoration = {"rp_default:grass"},
2189 y_min = 0,
2190 y_max = 32000,
2193 minetest.register_decoration(
2195 deco_type = "simple",
2196 place_on = "rp_default:dirt_with_grass",
2197 sidelen = 16,
2198 fill_ratio = 0.08,
2199 biomes = {"Forest", "Marsh", "Grove", "Shrubbery", "Oak Shrubbery"},
2200 decoration = {"rp_default:tall_grass"},
2201 y_min = 0,
2202 y_max = 32000,
2205 minetest.register_decoration(
2207 deco_type = "simple",
2208 place_on = "rp_default:dirt_with_grass",
2209 sidelen = 16,
2210 fill_ratio = 0.15,
2211 biomes = {"Deep Forest", "Dense Oak Forest"},
2212 decoration = {"rp_default:tall_grass"},
2213 y_min = 0,
2214 y_max = 32000,
2217 minetest.register_decoration(
2219 deco_type = "simple",
2220 place_on = "rp_default:dirt_with_grass",
2221 sidelen = 16,
2222 fill_ratio = 0.05,
2223 biomes = {"Thorny Shrubs"},
2224 decoration = {"rp_default:tall_grass"},
2225 y_min = 0,
2226 y_max = 32000,
2228 minetest.register_decoration(
2230 deco_type = "simple",
2231 place_on = "rp_default:dirt_with_grass",
2232 sidelen = 16,
2233 fill_ratio = 0.1,
2234 biomes = {"Thorny Shrubs"},
2235 decoration = {"rp_default:grass"},
2236 y_min = 0,
2237 y_max = 32000,
2242 minetest.register_decoration(
2244 deco_type = "simple",
2245 place_on = "rp_default:dirt_with_grass",
2246 sidelen = 16,
2247 fill_ratio = 0.16,
2248 biomes = {"Wilderness", "Thorny Shrubs"},
2249 decoration = {"rp_default:grass"},
2250 y_min = -32000,
2251 y_max = 32000,
2254 minetest.register_decoration(
2256 deco_type = "simple",
2257 place_on = "rp_default:dirt_with_grass",
2258 sidelen = 16,
2259 fill_ratio = 0.12,
2260 biomes = {"Wilderness", "Thorny Shrubs"},
2261 decoration = {"rp_default:tall_grass"},
2262 y_min = -32000,
2263 y_max = 32000,
2266 -- Fern decorations
2268 minetest.register_decoration(
2270 deco_type = "simple",
2271 place_on = "rp_default:dirt_with_grass",
2272 sidelen = 16,
2273 fill_ratio = 0.02,
2274 biomes = {"Wilderness", "Grove", "Tall Oak Forest", "Mystery Forest"},
2275 decoration = {"rp_default:fern"},
2276 y_min = -32000,
2277 y_max = 32000,
2280 -- Clam decorations
2282 minetest.register_decoration(
2284 deco_type = "simple",
2285 place_on = {"rp_default:sand", "rp_default:gravel"},
2286 sidelen = 16,
2287 fill_ratio = 0.02,
2288 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"},
2289 decoration = {"rp_default:clam"},
2290 y_min = 0,
2291 y_max = 1,
2295 --[[ ORES ]]
2297 -- Graphite ore
2299 minetest.register_ore( -- Common above sea level mainly
2301 ore_type = "scatter",
2302 ore = "rp_default:stone_with_graphite",
2303 wherein = "rp_default:stone",
2304 clust_scarcity = 9*9*9,
2305 clust_num_ores = 8,
2306 clust_size = 8,
2307 y_min = -8,
2308 y_max = 32,
2311 minetest.register_ore( -- Slight scattering deeper down
2313 ore_type = "scatter",
2314 ore = "rp_default:stone_with_graphite",
2315 wherein = "rp_default:stone",
2316 clust_scarcity = 13*13*13,
2317 clust_num_ores = 6,
2318 clust_size = 8,
2319 y_min = -31000,
2320 y_max = -32,
2323 -- Coal ore
2325 minetest.register_ore( -- Even distribution
2327 ore_type = "scatter",
2328 ore = "rp_default:stone_with_coal",
2329 wherein = "rp_default:stone",
2330 clust_scarcity = 10*10*10,
2331 clust_num_ores = 8,
2332 clust_size = 4,
2333 y_min = -31000,
2334 y_max = 32,
2337 minetest.register_ore( -- Dense sheet
2339 ore_type = "scatter",
2340 ore = "rp_default:stone_with_coal",
2341 wherein = "rp_default:stone",
2342 clust_scarcity = 7*7*7,
2343 clust_num_ores = 10,
2344 clust_size = 8,
2345 y_min = -40,
2346 y_max = -32,
2349 minetest.register_ore( -- Deep ore sheet
2351 ore_type = "scatter",
2352 ore = "rp_default:stone_with_coal",
2353 wherein = "rp_default:stone",
2354 clust_scarcity = 6*6*6,
2355 clust_num_ores = 26,
2356 clust_size = 12,
2357 y_min = -130,
2358 y_max = -120,
2361 -- Iron ore
2363 minetest.register_ore( -- Even distribution
2365 ore_type = "scatter",
2366 ore = "rp_default:stone_with_iron",
2367 wherein = "rp_default:stone",
2368 clust_scarcity = 12*12*12,
2369 clust_num_ores = 4,
2370 clust_size = 3,
2371 y_min = -31000,
2372 y_max = -8,
2375 minetest.register_ore( -- Dense sheet
2377 ore_type = "scatter",
2378 ore = "rp_default:stone_with_iron",
2379 wherein = "rp_default:stone",
2380 clust_scarcity = 8*8*8,
2381 clust_num_ores = 20,
2382 clust_size = 12,
2383 y_min = -32,
2384 y_max = -24,
2387 minetest.register_ore( -- Dense sheet
2389 ore_type = "scatter",
2390 ore = "rp_default:stone_with_iron",
2391 wherein = "rp_default:stone",
2392 clust_scarcity = 7*7*7,
2393 clust_num_ores = 17,
2394 clust_size = 6,
2395 y_min = -80,
2396 y_max = -60,
2399 -- Tin ore
2401 minetest.register_ore( -- Even distribution
2403 ore_type = "scatter",
2404 ore = "rp_default:stone_with_tin",
2405 wherein = "rp_default:stone",
2406 clust_scarcity = 14*14*14,
2407 clust_num_ores = 8,
2408 clust_size = 4,
2409 y_min = -31000,
2410 y_max = -100,
2413 minetest.register_ore( -- Dense sheet
2415 ore_type = "scatter",
2416 ore = "rp_default:stone_with_tin",
2417 wherein = "rp_default:stone",
2418 clust_scarcity = 7*7*7,
2419 clust_num_ores = 10,
2420 clust_size = 6,
2421 y_min = -150,
2422 y_max = -140,
2425 -- Copper ore
2427 minetest.register_ore( -- Begin sheet
2429 ore_type = "scatter",
2430 ore = "rp_default:stone_with_copper",
2431 wherein = "rp_default:stone",
2432 clust_scarcity = 6*6*6,
2433 clust_num_ores = 12,
2434 clust_size = 5,
2435 y_min = -90,
2436 y_max = -80,
2439 minetest.register_ore( -- Rare even distribution
2441 ore_type = "scatter",
2442 ore = "rp_default:stone_with_copper",
2443 wherein = "rp_default:stone",
2444 clust_scarcity = 13*13*13,
2445 clust_num_ores = 10,
2446 clust_size = 5,
2447 y_min = -31000,
2448 y_max = -90,
2451 minetest.register_ore( -- Large clusters
2453 ore_type = "scatter",
2454 ore = "rp_default:stone_with_copper",
2455 wherein = "rp_default:stone",
2456 clust_scarcity = 8*8*8,
2457 clust_num_ores = 22,
2458 clust_size = 10,
2459 y_min = -230,
2460 y_max = -180,
2463 -- Small gravel blobs
2464 minetest.register_ore({
2465 ore_type = "blob",
2466 ore = "rp_default:gravel",
2467 wherein = "rp_default:stone",
2468 clust_scarcity = 10*10*10,
2469 clust_num_ores = 33,
2470 clust_size = 4,
2471 y_min = -31000,
2472 y_max = 31000,
2473 noise_params = {
2474 offset = 0,
2475 scale = 1,
2476 spread = {x=150, y=150, z=150},
2477 seed = 58943,
2478 octaves = 3,
2479 persist = 0.5,
2480 lacunarity = 2,
2481 flags = "defaults",
2485 -- Small sand blobs
2486 minetest.register_ore({
2487 ore_type = "blob",
2488 ore = "rp_default:sand",
2489 wherein = "rp_default:stone",
2490 clust_scarcity = 10*10*10,
2491 clust_num_ores = 40,
2492 clust_size = 4,
2493 y_min = -31000,
2494 y_max = 31000,
2495 noise_params = {
2496 offset = 0,
2497 scale = 1,
2498 spread = {x=150, y=150, z=150},
2499 seed = 38943,
2500 octaves = 3,
2501 persist = 0.5,
2502 lacunarity = 2,
2503 flags = "defaults",
2508 -- Dirt, Dry Dirt and Swamp Dirt blobs.
2509 -- These get generated depending on the biome.
2510 -- The following code is to generate the list
2511 -- of biomes that include either dirt, dry dirt or swamp dirt.
2513 -- Returns a list of biomes that use the specified nodename
2514 -- as its dirt blob, by using the data from
2515 -- default.get_biome_info.
2516 -- * nodename: A name of the node (a dirt node)
2517 local get_dirt_biomes = function(nodename)
2518 local biomes = default.get_core_biomes()
2519 local out_biomes = {}
2520 for b=1, #biomes do
2521 local biome_info = default.get_biome_info(biomes[b])
2522 -- Add biome to list iff it uses the specified node as dirt blob
2523 if biome_info.dirt_blob ~= nil and biome_info.dirt_blob == nodename then
2524 table.insert(out_biomes, biomes[b])
2527 return out_biomes
2530 local dirt_biomes = get_dirt_biomes("rp_default:dirt")
2531 local dry_dirt_biomes = get_dirt_biomes("rp_default:dry_dirt")
2532 local swamp_dirt_biomes = get_dirt_biomes("rp_default:swamp_dirt")
2534 minetest.log("verbose", "[rp_default] List of builtin biomes with Dirt blobs: "..dump(dirt_biomes))
2535 minetest.log("verbose", "[rp_default] List of builtin biomes with Dry Dirt blobs: "..dump(dry_dirt_biomes))
2536 minetest.log("verbose", "[rp_default] List of builtin biomes with Swamp Dirt blobs: "..dump(swamp_dirt_biomes))
2538 local np_dirtlike = {
2539 offset = 0,
2540 scale = 1,
2541 spread = {x=150, y=150, z=150},
2542 seed = 98943,
2543 octaves = 3,
2544 persist = 0.5,
2545 lacunarity = 2,
2546 flags = "defaults",
2549 minetest.register_ore({
2550 ore_type = "blob",
2551 ore = "rp_default:dirt",
2552 wherein = "rp_default:stone",
2553 clust_scarcity = 10*10*10,
2554 clust_num_ores = 33,
2555 clust_size = 4,
2556 y_min = -31000,
2557 y_max = 31000,
2558 biomes = dirt_biomes,
2559 noise_params = np_dirtlike,
2562 minetest.register_ore({
2563 ore_type = "blob",
2564 ore = "rp_default:dry_dirt",
2565 wherein = "rp_default:stone",
2566 clust_scarcity = 10*10*10,
2567 clust_num_ores = 33,
2568 clust_size = 4,
2569 y_min = -31000,
2570 y_max = 31000,
2571 biomes = dry_dirt_biomes,
2572 noise_params = np_dirtlike,
2575 minetest.register_ore({
2576 ore_type = "blob",
2577 ore = "rp_default:swamp_dirt",
2578 wherein = "rp_default:stone",
2579 clust_scarcity = 10*10*10,
2580 clust_num_ores = 33,
2581 clust_size = 4,
2582 y_min = -31000,
2583 y_max = 31000,
2584 biomes = swamp_dirt_biomes,
2585 noise_params = np_dirtlike,