Fix biome heat/humid points not matching my plan
[Pixture/pixture_revival.git] / mods / rp_default / mapgen.lua
blob359030af82b85ead49e88de6148c5fc4733efa73
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 = 24,
142 humidity_point = 24,
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 = 1,
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 deco_type = "schematic",
992 place_on = {"rp_default:dirt_with_grass"},
993 sidelen = 16,
994 fill_ratio = 0.004,
995 biomes = {"Forest"},
996 flags = "place_center_x, place_center_z",
997 replacements = {
998 ["default:leaves"] = "rp_default:leaves_birch",
999 ["default:tree"] = "rp_default:tree_birch",
1000 ["default:apple"] = "air"
1002 schematic = minetest.get_modpath("rp_default")
1003 .. "/schematics/default_squaretree.mts",
1004 y_min = -32000,
1005 y_max = 32000,
1008 minetest.register_decoration(
1010 deco_type = "schematic",
1011 place_on = {"rp_default:dirt_with_grass"},
1012 sidelen = 16,
1013 fill_ratio = 0.015,
1014 biomes = {"Birch Forest"},
1015 flags = "place_center_x, place_center_z",
1016 replacements = {
1017 ["default:leaves"] = "rp_default:leaves_birch",
1018 ["default:tree"] = "rp_default:tree_birch",
1019 ["default:apple"] = "air"
1021 schematic = minetest.get_modpath("rp_default")
1022 .. "/schematics/default_squaretree.mts",
1023 y_min = -32000,
1024 y_max = 32000,
1027 minetest.register_decoration(
1029 deco_type = "schematic",
1030 place_on = {"rp_default:dirt_with_grass"},
1031 sidelen = 16,
1032 fill_ratio = 0.004,
1033 biomes = {"Dry Swamp"},
1034 flags = "place_center_x, place_center_z",
1035 replacements = {
1036 ["default:leaves"] = "rp_default:leaves_birch",
1037 ["default:tree"] = "rp_default:tree_birch",
1038 ["default:apple"] = "air"
1040 schematic = minetest.get_modpath("rp_default")
1041 .. "/schematics/default_squaretree.mts",
1042 y_min = -32000,
1043 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.0001,
1053 biomes = {"Thorny Shrubs"},
1054 flags = "place_center_x, place_center_z",
1055 schematic = minetest.get_modpath("rp_default")
1056 .. "/schematics/default_appletree.mts",
1057 y_min = -32000,
1058 y_max = 32000,
1063 minetest.register_decoration(
1065 deco_type = "schematic",
1066 place_on = {"rp_default:dirt_with_grass"},
1067 sidelen = 16,
1068 fill_ratio = 0.007,
1069 biomes = {"Orchard"},
1070 flags = "place_center_x, place_center_z",
1071 schematic = minetest.get_modpath("rp_default")
1072 .. "/schematics/default_appletree.mts",
1073 y_min = 10,
1074 y_max = 32000,
1077 minetest.register_decoration(
1079 deco_type = "schematic",
1080 place_on = {"rp_default:dirt_with_grass"},
1081 sidelen = 16,
1082 fill_ratio = 0.009,
1083 biomes = {"Forest", "Deep Forest"},
1084 flags = "place_center_x, place_center_z",
1085 schematic = minetest.get_modpath("rp_default")
1086 .. "/schematics/default_appletree.mts",
1087 y_min = -32000,
1088 y_max = 32000,
1091 minetest.register_decoration(
1093 deco_type = "schematic",
1094 place_on = {"rp_default:dirt_with_grass"},
1095 sidelen = 16,
1096 fill_ratio = 0.008,
1097 biomes = {"Forest"},
1098 flags = "place_center_x, place_center_z",
1099 schematic = minetest.get_modpath("rp_default")
1100 .. "/schematics/default_megatree.mts",
1101 y_min = -32000,
1102 y_max = 32000,
1105 minetest.register_decoration(
1107 name = "rp_default:gigatree",
1108 deco_type = "schematic",
1109 place_on = {"rp_default:dirt_with_grass"},
1110 sidelen = 16,
1111 fill_ratio = 0.023,
1112 biomes = {"Deep Forest"},
1113 flags = "place_center_x, place_center_z",
1114 schematic = minetest.get_modpath("rp_default")
1115 .. "/schematics/default_gigatree.mts",
1116 y_min = -32000,
1117 y_max = 32000,
1120 minetest.register_decoration(
1122 deco_type = "schematic",
1123 place_on = {"rp_default:dirt_with_grass"},
1124 sidelen = 16,
1125 fill_ratio = 0.0009,
1126 biomes = {"Oak Forest"},
1127 flags = "place_center_x, place_center_z",
1128 schematic = minetest.get_modpath("rp_default")
1129 .. "/schematics/rp_default_oak_tree_big_1.mts",
1130 y_min = 1,
1131 y_max = 32000,
1134 minetest.register_decoration(
1136 deco_type = "schematic",
1137 place_on = {"rp_default:dirt_with_grass"},
1138 sidelen = 16,
1139 fill_ratio = 0.0045,
1140 biomes = {"Tall Oak Forest"},
1141 flags = "place_center_x, place_center_z",
1142 schematic = minetest.get_modpath("rp_default")
1143 .. "/schematics/rp_default_oak_tree_big_1.mts",
1144 y_min = 1,
1145 y_max = 32000,
1147 minetest.register_decoration(
1149 deco_type = "schematic",
1150 place_on = {"rp_default:dirt_with_grass"},
1151 sidelen = 16,
1152 fill_ratio = 0.0045,
1153 biomes = {"Tall Oak Forest"},
1154 flags = "place_center_x, place_center_z",
1155 schematic = minetest.get_modpath("rp_default")
1156 .. "/schematics/rp_default_oak_tree_big_2.mts",
1157 y_min = 1,
1158 y_max = 32000,
1162 minetest.register_decoration(
1164 deco_type = "schematic",
1165 place_on = {"rp_default:dirt_with_grass"},
1166 sidelen = 16,
1167 fill_ratio = 0.035,
1168 biomes = {"Dense Oak Forest"},
1169 flags = "place_center_x, place_center_z",
1170 schematic = minetest.get_modpath("rp_default")
1171 .. "/schematics/rp_default_oak_tree_big_1.mts",
1172 y_min = 1,
1173 y_max = 32000,
1175 minetest.register_decoration(
1177 deco_type = "schematic",
1178 place_on = {"rp_default:dirt_with_grass"},
1179 sidelen = 16,
1180 fill_ratio = 0.035,
1181 biomes = {"Dense Oak Forest"},
1182 flags = "place_center_x, place_center_z",
1183 schematic = minetest.get_modpath("rp_default")
1184 .. "/schematics/rp_default_oak_tree_big_2.mts",
1185 y_min = 1,
1186 y_max = 32000,
1191 minetest.register_decoration(
1193 deco_type = "schematic",
1194 place_on = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
1195 sidelen = 16,
1196 fill_ratio = 0.0008,
1197 biomes = {"Mixed Swamp", "Mixed Swamp Beach"},
1198 flags = "place_center_x, place_center_z",
1199 schematic = minetest.get_modpath("rp_default")
1200 .. "/schematics/rp_default_swamp_oak.mts",
1201 y_min = 0,
1202 y_max = 32000,
1205 minetest.register_decoration(
1207 deco_type = "schematic",
1208 place_on = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
1209 sidelen = 16,
1210 fill_ratio = 0.006,
1211 biomes = {"Swamp Forest", "Swamp Forest Beach"},
1212 flags = "place_center_x, place_center_z",
1213 schematic = minetest.get_modpath("rp_default")
1214 .. "/schematics/rp_default_swamp_oak.mts",
1215 y_min = 0,
1216 y_max = 32000,
1219 minetest.register_decoration(
1221 deco_type = "schematic",
1222 place_on = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt", "rp_default:dirt"},
1223 sidelen = 16,
1224 fill_ratio = 0.0001,
1225 biomes = {"Swamp Forest", "Swamp Forest Beach"},
1226 flags = "place_center_x, place_center_z",
1227 schematic = minetest.get_modpath("rp_default")
1228 .. "/schematics/rp_default_swamp_birch.mts",
1229 y_min = 0,
1230 y_max = 32000,
1232 minetest.register_decoration(
1234 deco_type = "schematic",
1235 place_on = {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt", "rp_default:dirt"},
1236 sidelen = 16,
1237 fill_ratio = 0.003,
1238 biomes = {"Dry Swamp", "Dry Swamp Beach"},
1239 flags = "place_center_x, place_center_z",
1240 schematic = minetest.get_modpath("rp_default")
1241 .. "/schematics/rp_default_swamp_birch.mts",
1242 y_min = 0,
1243 y_max = 32000,
1248 local MYSTERY_FOREST_SPREAD = { x=500, y=500, z=500 }
1249 local MYSTERY_FOREST_OFFSET = 0.001
1250 local MYSTERY_FOREST_OFFSET_STAIRCASE = -0.001
1251 local MYSTERY_FOREST_OFFSET_APPLES = -0.0005
1252 local MYSTERY_FOREST_SCALE = 0.008
1254 minetest.register_decoration(
1256 deco_type = "schematic",
1257 place_on = {"rp_default:dirt_with_grass"},
1258 sidelen = 16,
1259 biomes = {"Mystery Forest"},
1260 flags = "place_center_x, place_center_z",
1261 schematic = minetest.get_modpath("rp_default")
1262 .. "/schematics/rp_default_staircase_tree.mts",
1263 y_min = 1,
1264 y_max = 32000,
1265 noise_params = {
1266 octaves = 2,
1267 scale = -MYSTERY_FOREST_SCALE,
1268 offset = MYSTERY_FOREST_OFFSET_STAIRCASE,
1269 spread = MYSTERY_FOREST_SPREAD,
1270 lacunarity = 2.0,
1271 persistence = 0.5,
1272 seed = 49204,
1276 minetest.register_decoration(
1278 deco_type = "schematic",
1279 place_on = {"rp_default:dirt_with_grass"},
1280 sidelen = 16,
1281 biomes = {"Mystery Forest"},
1282 flags = "place_center_x, place_center_z",
1283 schematic = minetest.get_modpath("rp_default")
1284 .. "/schematics/rp_default_layer_birch.mts",
1285 y_min = 1,
1286 y_max = 32000,
1287 noise_params = {
1288 octaves = 2,
1289 scale = MYSTERY_FOREST_SCALE,
1290 offset = MYSTERY_FOREST_OFFSET,
1291 spread = MYSTERY_FOREST_SPREAD,
1292 lacunarity = 2.0,
1293 persistence = 0.5,
1294 seed = 49204,
1298 minetest.register_decoration(
1300 deco_type = "schematic",
1301 place_on = {"rp_default:dirt_with_grass"},
1302 sidelen = 16,
1303 biomes = {"Mystery Forest"},
1304 flags = "place_center_x, place_center_z",
1305 schematic = minetest.get_modpath("rp_default")
1306 .. "/schematics/rp_default_telephone_tree.mts",
1307 y_min = 1,
1308 y_max = 32000,
1309 noise_params = {
1310 octaves = 2,
1311 scale = -MYSTERY_FOREST_SCALE,
1312 offset = MYSTERY_FOREST_OFFSET,
1313 spread = MYSTERY_FOREST_SPREAD,
1314 lacunarity = 2.0,
1315 persistence = 0.5,
1316 seed = 49204,
1320 minetest.register_decoration(
1322 deco_type = "schematic",
1323 place_on = {"rp_default:dirt_with_grass"},
1324 sidelen = 16,
1325 biomes = {"Mystery Forest"},
1326 flags = "place_center_x, place_center_z",
1327 schematic = minetest.get_modpath("rp_default")
1328 .. "/schematics/rp_default_telephone_tree_apples.mts",
1329 y_min = 1,
1330 y_max = 32000,
1331 noise_params = {
1332 octaves = 2,
1333 scale = -MYSTERY_FOREST_SCALE,
1334 offset = MYSTERY_FOREST_OFFSET_APPLES,
1335 spread = MYSTERY_FOREST_SPREAD,
1336 lacunarity = 2.0,
1337 persistence = 0.5,
1338 seed = 49204,
1345 minetest.register_decoration(
1347 deco_type = "schematic",
1348 place_on = {"rp_default:dirt_with_grass"},
1349 sidelen = 16,
1350 biomes = {"Mystery Forest"},
1351 flags = "place_center_x, place_center_z",
1352 schematic = minetest.get_modpath("rp_default")
1353 .. "/schematics/rp_default_cross_birch.mts",
1354 y_min = 1,
1355 y_max = 32000,
1356 noise_params = {
1357 octaves = 2,
1358 scale = MYSTERY_FOREST_SCALE,
1359 offset = MYSTERY_FOREST_OFFSET,
1360 spread = MYSTERY_FOREST_SPREAD,
1361 lacunarity = 2.0,
1362 persistence = 0.5,
1363 seed = 49204,
1367 minetest.register_decoration(
1369 deco_type = "schematic",
1370 place_on = {"rp_default:dirt_with_grass"},
1371 sidelen = 16,
1372 biomes = {"Poplar Plains"},
1373 flags = "place_center_x, place_center_z",
1374 schematic = minetest.get_modpath("rp_default")
1375 .. "/schematics/rp_default_poplar_large.mts",
1376 y_min = 1,
1377 y_max = 32000,
1378 noise_params = {
1379 octaves = 2,
1380 scale = 0.01,
1381 offset = -0.004,
1382 spread = {x=50,y=50,z=50},
1383 lacunarity = 2.0,
1384 persistence = 0.5,
1385 seed = 94325,
1388 minetest.register_decoration(
1390 deco_type = "schematic",
1391 place_on = {"rp_default:dirt_with_grass"},
1392 sidelen = 16,
1393 biomes = {"Poplar Plains"},
1394 flags = "place_center_x, place_center_z",
1395 schematic = minetest.get_modpath("rp_default")
1396 .. "/schematics/rp_default_poplar_small.mts",
1397 y_min = 1,
1398 y_max = 32000,
1399 noise_params = {
1400 octaves = 2,
1401 scale = 0.01,
1402 offset = -0.001,
1403 spread = {x=50,y=50,z=50},
1404 lacunarity = 2.0,
1405 persistence = 0.5,
1406 seed = 94325,
1409 minetest.register_decoration(
1411 deco_type = "schematic",
1412 place_on = {"rp_default:dirt_with_grass"},
1413 fill_ratio = 0.0002,
1414 sidelen = 16,
1415 biomes = {"Poplar Plains"},
1416 flags = "place_center_x, place_center_z",
1417 schematic = minetest.get_modpath("rp_default")
1418 .. "/schematics/rp_default_poplar_small.mts",
1419 y_min = 1,
1420 y_max = 32000,
1423 -- Small poplar tree blobs
1424 minetest.register_decoration(
1426 deco_type = "schematic",
1427 place_on = {"rp_default:dirt_with_grass"},
1428 sidelen = 8,
1429 biomes = {"Baby Poplar Plains"},
1430 flags = "place_center_x, place_center_z",
1431 schematic = minetest.get_modpath("rp_default")
1432 .. "/schematics/rp_default_poplar_small.mts",
1433 y_min = 1,
1434 y_max = 32000,
1435 noise_params = {
1436 octaves = 2,
1437 scale = 0.05,
1438 offset = -0.032,
1439 spread = {x=24,y=24,z=24},
1440 lacunarity = 2.0,
1441 persistence = 0.5,
1442 seed = 94325,
1446 -- Occasional lonely poplars
1447 minetest.register_decoration(
1449 deco_type = "schematic",
1450 place_on = {"rp_default:dirt_with_grass"},
1451 sidelen = 16,
1452 fill_ratio = 0.0002,
1453 biomes = {"Baby Poplar Plains"},
1454 flags = "place_center_x, place_center_z",
1455 schematic = minetest.get_modpath("rp_default")
1456 .. "/schematics/rp_default_poplar_small.mts",
1457 y_min = 1,
1458 y_max = 32000,
1461 minetest.register_decoration(
1463 deco_type = "schematic",
1464 place_on = {"rp_default:dirt_with_grass"},
1465 sidelen = 16,
1466 biomes = {"Baby Poplar Plains"},
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",
1472 noise_params = {
1473 octaves = 1,
1474 scale = 0.001,
1475 offset = -0.0000001,
1476 spread = { x = 50, y = 50, z = 50 },
1477 lacunarity = 2.0,
1478 persistence = 0.5,
1479 seed = 98421,
1483 minetest.register_decoration(
1485 deco_type = "schematic",
1486 place_on = {"rp_default:dirt_with_grass"},
1487 sidelen = 16,
1488 biomes = {"Thorny Shrubs"},
1489 flags = "place_center_x, place_center_z",
1490 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_bush.mts",
1491 y_min = 3,
1492 y_max = 32000,
1493 rotation = "0",
1494 noise_params = {
1495 octaves = 1,
1496 scale = -0.004,
1497 offset = 0.002,
1498 spread = { x = 82, y = 82, z = 82 },
1499 lacunarity = 2.0,
1500 persistence = 0.5,
1501 seed = 43905,
1505 minetest.register_decoration(
1507 deco_type = "schematic",
1508 place_on = {"rp_default:dirt_with_grass"},
1509 sidelen = 16,
1510 fill_ratio = 0.006,
1511 biomes = {"Shrubbery"},
1512 flags = "place_center_x, place_center_z",
1513 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_bush.mts",
1514 y_min = 1,
1515 y_max = 32000,
1516 rotation = "0",
1520 minetest.register_decoration(
1522 deco_type = "schematic",
1523 place_on = {"rp_default:dirt_with_grass"},
1524 sidelen = 16,
1525 fill_ratio = 0.004,
1526 biomes = {"Grove"},
1527 flags = "place_center_x, place_center_z",
1528 schematic = minetest.get_modpath("rp_default")
1529 .. "/schematics/default_talltree.mts",
1530 y_min = 0,
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.015,
1540 biomes = {"Tall Birch Forest"},
1541 flags = "place_center_x, place_center_z",
1542 schematic = minetest.get_modpath("rp_default")
1543 .. "/schematics/rp_default_birch_tall.mts",
1544 y_min = -32000,
1545 y_max = 32000,
1548 minetest.register_decoration(
1550 deco_type = "schematic",
1551 place_on = {"rp_default:dirt_with_grass"},
1552 sidelen = 16,
1553 fill_ratio = 0.004,
1554 biomes = {"Wilderness"},
1555 flags = "place_center_x, place_center_z",
1556 replacements = {
1557 ["default:apple"] = "air",
1559 schematic = minetest.get_modpath("rp_default")
1560 .. "/schematics/default_appletree.mts",
1561 y_min = -32000,
1562 y_max = 32000,
1565 minetest.register_decoration(
1567 deco_type = "schematic",
1568 place_on = {"rp_default:dirt_with_grass", "rp_default:dirt"},
1569 sidelen = 16,
1570 fill_ratio = 0.0001,
1571 biomes = {"Dry Swamp"},
1572 flags = "place_center_x, place_center_z",
1573 schematic = minetest.get_modpath("rp_default")
1574 .. "/schematics/default_appletree.mts",
1575 y_min = -32000,
1576 y_max = 32000,
1579 minetest.register_decoration(
1581 deco_type = "schematic",
1582 place_on = {"rp_default:dirt_with_grass"},
1583 sidelen = 16,
1584 fill_ratio = 0.004,
1585 biomes = {"Wilderness"},
1586 flags = "place_center_x, place_center_z",
1587 schematic = minetest.get_modpath("rp_default")
1588 .. "/schematics/default_oaktree.mts",
1589 y_min = -32000,
1590 y_max = 32000,
1594 minetest.register_decoration(
1596 deco_type = "schematic",
1597 place_on = {"rp_default:dirt_with_grass"},
1598 sidelen = 16,
1599 fill_ratio = 0.001,
1600 biomes = {"Oak Shrubbery"},
1601 flags = "place_center_x, place_center_z",
1602 schematic = minetest.get_modpath("rp_default")
1603 .. "/schematics/default_oaktree.mts",
1604 y_min = 1,
1605 y_max = 32000,
1608 minetest.register_decoration(
1610 deco_type = "schematic",
1611 place_on = {"rp_default:dirt_with_grass"},
1612 sidelen = 16,
1613 fill_ratio = 0.02,
1614 biomes = {"Dense Oak Forest"},
1615 flags = "place_center_x, place_center_z",
1616 schematic = minetest.get_modpath("rp_default")
1617 .. "/schematics/default_oaktree.mts",
1618 y_min = 1,
1619 y_max = 32000,
1622 minetest.register_decoration(
1624 deco_type = "schematic",
1625 place_on = {"rp_default:dirt_with_grass"},
1626 sidelen = 16,
1627 fill_ratio = 0.0225,
1628 biomes = {"Oak Forest"},
1629 flags = "place_center_x, place_center_z",
1630 schematic = minetest.get_modpath("rp_default")
1631 .. "/schematics/default_oaktree.mts",
1632 y_min = 1,
1633 y_max = 32000,
1636 minetest.register_decoration(
1638 deco_type = "schematic",
1639 place_on = {"rp_default:dirt_with_grass"},
1640 sidelen = 16,
1641 fill_ratio = 0.0015,
1642 biomes = {"Tall Oak Forest"},
1643 flags = "place_center_x, place_center_z",
1644 schematic = minetest.get_modpath("rp_default")
1645 .. "/schematics/default_oaktree.mts",
1646 y_min = 1,
1647 y_max = 32000,
1654 -- Cactus decorations
1656 minetest.register_decoration(
1658 deco_type = "schematic",
1659 place_on = {"rp_default:sand"},
1660 sidelen = 16,
1661 fill_ratio = 0.004,
1662 biomes = {"Desert"},
1663 flags = "place_center_x, place_center_z",
1664 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_cactus.mts",
1665 y_min = 10,
1666 y_max = 500,
1667 rotation = "random",
1670 -- Rock decorations
1672 minetest.register_decoration(
1674 deco_type = "schematic",
1675 place_on = {"rp_default:dry_dirt"},
1676 sidelen = 16,
1677 fill_ratio = 0.006,
1678 biomes = {"Wasteland"},
1679 flags = "place_center_x, place_center_z",
1680 schematic = minetest.get_modpath("rp_default")
1681 .. "/schematics/default_small_rock.mts",
1682 replacements = {["default:dirt"] = "rp_default:dry_dirt"},
1683 y_min = 1,
1684 y_max = 32000,
1685 rotation = "random",
1688 minetest.register_decoration(
1690 deco_type = "schematic",
1691 place_on = {"rp_default:dry_dirt"},
1692 sidelen = 16,
1693 fill_ratio = 0.004,
1694 biomes = {"Wasteland"},
1695 flags = "place_center_x, place_center_z",
1696 schematic = minetest.get_modpath("rp_default")
1697 .. "/schematics/default_large_rock.mts",
1698 replacements = {["default:dirt"] = "rp_default:dry_dirt"},
1699 y_min = 1,
1700 y_max = 32000,
1701 rotation = "random",
1704 minetest.register_decoration(
1706 deco_type = "schematic",
1707 place_on = {"rp_default:stone", "rp_default:dry_dirt"},
1708 sidelen = 16,
1709 fill_ratio = 0.003,
1710 biomes = {"Rocky Dryland"},
1711 flags = "place_center_x, place_center_z",
1712 schematic = minetest.get_modpath("rp_default")
1713 .. "/schematics/default_small_rock.mts",
1714 replacements = {["default:dirt"] = "rp_default:dry_dirt"},
1715 y_min = 1,
1716 y_max = 32000,
1717 rotation = "random",
1720 minetest.register_decoration(
1722 deco_type = "schematic",
1723 place_on = {"rp_default:dry_dirt", "rp_default:dirt_with_dry_grass"},
1724 sidelen = 16,
1725 fill_ratio = 0.001,
1726 biomes = {"Savannic Wasteland"},
1727 flags = "place_center_x, place_center_z",
1728 schematic = minetest.get_modpath("rp_default")
1729 .. "/schematics/default_small_rock.mts",
1730 replacements = {["default:dirt"] = "rp_default:dry_dirt"},
1731 y_min = 1,
1732 y_max = 32000,
1733 rotation = "random",
1737 -- Sulfur decorations
1739 minetest.register_decoration(
1741 deco_type = "simple",
1742 place_on = "rp_default:dry_dirt",
1743 sidelen = 16,
1744 fill_ratio = 0.005,
1745 biomes = {"Wasteland"},
1746 decoration = {"rp_default:stone_with_sulfur"},
1747 y_min = 2,
1748 y_max = 14,
1751 -- Tiny tree decorations
1753 minetest.register_decoration(
1755 deco_type = "schematic",
1756 place_on = {"rp_default:dry_dirt"},
1757 sidelen = 16,
1758 fill_ratio = 0.0001,
1759 biomes = {"Rocky Dryland"},
1760 flags = "place_center_x, place_center_z",
1761 schematic = minetest.get_modpath("rp_default")
1762 .. "/schematics/rp_default_tiny_birch.mts",
1763 y_min = 1,
1764 y_max = 32000,
1767 minetest.register_decoration(
1769 deco_type = "schematic",
1770 place_on = {"rp_default:dry_dirt"},
1771 sidelen = 16,
1772 fill_ratio = 0.00025,
1773 biomes = {"Rocky Dryland"},
1774 flags = "place_center_x, place_center_z",
1775 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_3layer.mts",
1776 y_min = 3,
1777 y_max = 32000,
1779 minetest.register_decoration(
1781 deco_type = "schematic",
1782 place_on = {"rp_default:dry_dirt"},
1783 sidelen = 16,
1784 fill_ratio = 0.00025,
1785 biomes = {"Rocky Dryland"},
1786 flags = "place_center_x, place_center_z",
1787 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_2layer.mts",
1788 y_min = 3,
1789 y_max = 32000,
1791 minetest.register_decoration(
1793 deco_type = "schematic",
1794 place_on = {"rp_default:dry_dirt"},
1795 sidelen = 16,
1796 fill_ratio = 0.002,
1797 biomes = {"Rocky Dryland"},
1798 flags = "place_center_x, place_center_z",
1799 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
1800 y_min = 3,
1801 y_max = 32000,
1803 minetest.register_decoration(
1805 deco_type = "schematic",
1806 place_on = {"rp_default:dry_dirt"},
1807 sidelen = 16,
1808 fill_ratio = 0.0001,
1809 biomes = {"Rocky Dryland"},
1810 flags = "place_center_x, place_center_z",
1811 schematic = minetest.get_modpath("rp_default")
1812 .. "/schematics/rp_default_tiny_birch.mts",
1813 y_min = 1,
1814 y_max = 32000,
1817 minetest.register_decoration(
1819 deco_type = "schematic",
1820 place_on = {"rp_default:dry_dirt"},
1821 sidelen = 16,
1822 fill_ratio = 0.00025,
1823 biomes = {"Rocky Dryland"},
1824 flags = "place_center_x, place_center_z",
1825 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_3layer.mts",
1826 y_min = 3,
1827 y_max = 32000,
1829 minetest.register_decoration(
1831 deco_type = "schematic",
1832 place_on = {"rp_default:dry_dirt"},
1833 sidelen = 16,
1834 fill_ratio = 0.00025,
1835 biomes = {"Rocky Dryland"},
1836 flags = "place_center_x, place_center_z",
1837 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_2layer.mts",
1838 y_min = 3,
1839 y_max = 32000,
1841 minetest.register_decoration(
1843 deco_type = "schematic",
1844 place_on = {"rp_default:dry_dirt"},
1845 sidelen = 16,
1846 fill_ratio = 0.002,
1847 biomes = {"Rocky Dryland"},
1848 flags = "place_center_x, place_center_z",
1849 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
1850 y_min = 3,
1851 y_max = 32000,
1854 minetest.register_decoration(
1856 deco_type = "schematic",
1857 place_on = {"rp_default:dry_dirt"},
1858 sidelen = 16,
1859 fill_ratio = 0.003,
1860 biomes = {"Wooded Dryland"},
1861 flags = "place_center_x, place_center_z",
1862 schematic = minetest.get_modpath("rp_default")
1863 .. "/schematics/rp_default_tiny_oak.mts",
1864 y_min = 1,
1865 y_max = 32000,
1868 minetest.register_decoration(
1870 deco_type = "schematic",
1871 place_on = {"rp_default:dry_dirt"},
1872 sidelen = 16,
1873 fill_ratio = 0.001,
1874 biomes = {"Wooded Dryland"},
1875 flags = "place_center_x, place_center_z",
1876 schematic = minetest.get_modpath("rp_default")
1877 .. "/schematics/rp_default_tiny_birch.mts",
1878 y_min = 1,
1879 y_max = 32000,
1883 minetest.register_decoration(
1885 deco_type = "schematic",
1886 place_on = {"rp_default:dry_dirt"},
1887 sidelen = 16,
1888 fill_ratio = 0.0002,
1889 biomes = {"Savannic Wasteland"},
1890 flags = "place_center_x, place_center_z",
1891 schematic = minetest.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
1892 y_min = 3,
1893 y_max = 32000,
1898 -- Bush/shrub decorations
1900 minetest.register_decoration(
1902 deco_type = "schematic",
1903 place_on = {"rp_default:dirt_with_grass"},
1904 sidelen = 16,
1905 fill_ratio = 0.0075,
1906 biomes = {"Oak Shrubbery"},
1907 flags = "place_center_x, place_center_z",
1908 schematic = minetest.get_modpath("rp_default")
1909 .. "/schematics/rp_default_oak_bush_wide.mts",
1910 y_min = 1,
1911 y_max = 32000,
1914 minetest.register_decoration(
1916 deco_type = "schematic",
1917 place_on = {"rp_default:dirt_with_grass"},
1918 sidelen = 16,
1919 fill_ratio = 0.03,
1920 biomes = {"Dense Oak Forest"},
1921 flags = "place_center_x, place_center_z",
1922 schematic = minetest.get_modpath("rp_default")
1923 .. "/schematics/rp_default_oak_bush_wide.mts",
1924 y_min = 1,
1925 y_max = 32000,
1928 minetest.register_decoration(
1930 deco_type = "schematic",
1931 place_on = {"rp_default:dirt_with_grass"},
1932 sidelen = 16,
1933 fill_ratio = 0.001,
1934 biomes = {"Oak Forest"},
1935 flags = "place_center_x, place_center_z",
1936 schematic = minetest.get_modpath("rp_default")
1937 .. "/schematics/rp_default_oak_bush_wide.mts",
1938 y_min = 1,
1939 y_max = 32000,
1942 minetest.register_decoration(
1944 deco_type = "schematic",
1945 place_on = {"rp_default:dirt_with_dry_grass"},
1946 sidelen = 16,
1947 fill_ratio = 0.005,
1948 biomes = {"Savanna", "Chaparral"},
1949 flags = "place_center_x, place_center_z",
1950 replacements = {["default:leaves"] = "rp_default:dry_leaves"},
1951 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_shrub.mts",
1952 y_min = 3,
1953 y_max = 32000,
1954 rotation = "0",
1957 minetest.register_decoration(
1959 deco_type = "schematic",
1960 place_on = {"rp_default:dirt_with_dry_grass"},
1961 sidelen = 16,
1962 fill_ratio = 0.0025,
1963 biomes = {"Savannic Wasteland"},
1964 flags = "place_center_x, place_center_z",
1965 replacements = {["default:leaves"] = "rp_default:dry_leaves"},
1966 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_shrub.mts",
1967 y_min = 3,
1968 y_max = 32000,
1969 rotation = "0",
1972 minetest.register_decoration(
1974 deco_type = "schematic",
1975 place_on = {"rp_default:dry_dirt"},
1976 sidelen = 16,
1977 fill_ratio = 0.001,
1978 biomes = {"Rocky Dryland", "Wooded Dryland"},
1979 flags = "place_center_x, place_center_z",
1980 replacements = {["default:leaves"] = "rp_default:dry_leaves"},
1981 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_shrub.mts",
1982 y_min = 3,
1983 y_max = 32000,
1986 minetest.register_decoration(
1988 deco_type = "schematic",
1989 place_on = {"rp_default:dirt_with_dry_grass"},
1990 sidelen = 16,
1991 fill_ratio = 0.06,
1992 biomes = {"Chaparral"},
1993 flags = "place_center_x, place_center_z",
1994 replacements = {["default:leaves"] = "rp_default:dry_leaves"},
1995 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_dry_bush.mts",
1996 y_min = 0,
1997 y_max = 32000,
1998 rotation = "0",
2000 minetest.register_decoration(
2002 deco_type = "schematic",
2003 place_on = {"rp_default:dirt_with_grass"},
2004 sidelen = 16,
2005 biomes = {"Thorny Shrubs"},
2006 flags = "place_center_x, place_center_z",
2007 replacements = {["default:leaves"] = "rp_default:dry_leaves"},
2008 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_dry_bush.mts",
2009 y_min = 5,
2010 y_max = 32000,
2011 rotation = "0",
2012 noise_params = {
2013 octaves = 1,
2014 scale = -0.004,
2015 offset = -0.001,
2016 spread = { x = 82, y = 82, z = 82 },
2017 lacunarity = 2.0,
2018 persistence = 0.5,
2019 seed = 493421,
2024 minetest.register_decoration(
2026 deco_type = "schematic",
2027 place_on = {"rp_default:dirt_with_grass"},
2028 sidelen = 16,
2029 fill_ratio = 0.0003,
2030 biomes = {"Oak Shrubbery"},
2031 flags = "place_center_x, place_center_z",
2032 schematic = minetest.get_modpath("rp_default")
2033 .. "/schematics/rp_default_normal_bush_small.mts",
2034 y_min = 1,
2035 y_max = 32000,
2038 minetest.register_decoration(
2040 deco_type = "schematic",
2041 place_on = {"rp_default:dirt_with_grass"},
2042 sidelen = 16,
2043 fill_ratio = 0.006,
2044 biomes = {"Shrubbery"},
2045 flags = "place_center_x, place_center_z",
2046 schematic = minetest.get_modpath("rp_default")
2047 .. "/schematics/rp_default_normal_bush_small.mts",
2048 y_min = 1,
2049 y_max = 32000,
2054 minetest.register_decoration(
2056 deco_type = "schematic",
2057 place_on = {"rp_default:dirt_with_grass"},
2058 sidelen = 16,
2059 fill_ratio = 0.004,
2060 biomes = {"Wilderness", "Grove"},
2061 flags = "place_center_x, place_center_z",
2062 schematic = minetest.get_modpath("rp_default") .. "/schematics/default_bush.mts",
2063 y_min = 3,
2064 y_max = 32000,
2065 rotation = "0",
2068 -- Thistle decorations
2070 minetest.register_decoration(
2072 deco_type = "simple",
2073 place_on = "rp_default:dirt_with_grass",
2074 sidelen = 16,
2075 fill_ratio = 0.024,
2076 biomes = {"Wilderness"},
2077 decoration = {"rp_default:thistle"},
2078 height = 2,
2079 y_min = -32000,
2080 y_max = 32000,
2082 minetest.register_decoration(
2084 deco_type = "simple",
2085 place_on = {"rp_default:dirt_with_grass", "rp_default:dry_dirt"},
2086 sidelen = 4,
2087 biomes = {"Thorny Shrubs"},
2088 decoration = {"rp_default:thistle"},
2089 height = 2,
2090 y_min = -32000,
2091 y_max = 32000,
2092 noise_params = {
2093 octaves = 2,
2094 scale = 1,
2095 offset = -0.5,
2096 spread = { x = 12, y = 12, z = 12 },
2097 lacunarity = 2.0,
2098 persistence = 0.5,
2099 seed = 43905,
2102 -- Papyrus decorations
2104 -- Beach papyrus
2105 minetest.register_decoration(
2107 deco_type = "simple",
2108 place_on = {"rp_default:sand", "rp_default:dirt", "rp_default:dirt_with_grass"},
2109 spawn_by = {"rp_default:water_source", "rp_default:water_flowing"},
2110 num_spawn_by = 1,
2111 sidelen = 16,
2112 fill_ratio = 0.08,
2113 biomes = {"Grassland Ocean", "Grassland", "Forest Ocean", "Forest", "Wilderness Ocean", "Wilderness", "Birch Forest Ocean", "Tall Birch Forest Ocean", "Marsh Beach"},
2114 decoration = {"rp_default:papyrus"},
2115 height = 2,
2116 y_max = 3,
2117 y_min = 0,
2120 -- Grassland papyrus
2121 minetest.register_decoration(
2123 deco_type = "simple",
2124 place_on = {"rp_default:dirt_with_grass"},
2125 spawn_by = {"group:water"},
2126 num_spawn_by = 1,
2127 sidelen = 16,
2128 fill_ratio = 0.08,
2129 biomes = {"Grassland", "Marsh", "Forest", "Deep Forest", "Wilderness", "Baby Poplar Plains"},
2130 decoration = {"rp_default:papyrus"},
2131 height = 2,
2132 height_max = 3,
2133 y_max = 30,
2134 y_min = 4,
2138 -- Swamp papyrus
2139 minetest.register_decoration(
2141 deco_type = "simple",
2142 place_on = {"rp_default:swamp_dirt", "rp_default:dirt_with_swamp_grass"},
2143 spawn_by = {"group:water"},
2144 num_spawn_by = 1,
2145 sidelen = 16,
2146 fill_ratio = 0.30,
2147 biomes = {"Mixed Swamp"},
2148 decoration = {"rp_default:papyrus"},
2149 height = 3,
2150 height_max = 4,
2151 y_max = 31000,
2152 y_min = -100,
2155 minetest.register_decoration(
2157 deco_type = "simple",
2158 place_on = {"rp_default:swamp_dirt", "rp_default:dirt_with_swamp_grass"},
2159 spawn_by = {"group:water"},
2160 num_spawn_by = 1,
2161 sidelen = 16,
2162 fill_ratio = 0.60,
2163 biomes = {"Papyrus Swamp"},
2164 decoration = {"rp_default:papyrus"},
2165 height = 4,
2166 height_max = 4,
2167 y_max = 31000,
2168 y_min = -100,
2171 -- Flower decorations
2173 minetest.register_decoration(
2175 deco_type = "simple",
2176 place_on = "rp_default:dirt_with_grass",
2177 sidelen = 16,
2178 fill_ratio = 0.04,
2179 biomes = {"Grassland", "Wilderness", "Orchard", "Baby Poplar Plains"},
2180 decoration = {"rp_default:flower"},
2181 y_min = -32000,
2182 y_max = 32000,
2185 -- Grass decorations
2187 if mg_name ~= "v6" then
2188 minetest.register_decoration(
2190 deco_type = "simple",
2191 place_on = "rp_default:dirt_with_grass",
2192 sidelen = 16,
2193 fill_ratio = 0.18,
2194 biomes = {"Grassland", "Orchard", "Swamp Meadow", "Baby Poplar Plains", "Poplar Plains", "Shrubbery", "Oak Shrubbery", "Thorny Shrubs", "Dry Swamp"},
2195 decoration = {"rp_default:grass"},
2196 y_min = 10,
2197 y_max = 32000,
2201 minetest.register_decoration(
2203 deco_type = "simple",
2204 place_on = "rp_default:dirt_with_swamp_grass",
2205 sidelen = 16,
2206 fill_ratio = 0.04,
2207 biomes = {"Mixed Swamp", "Dry Swamp", "Swamp Meadow", "Swamp Papyrus", "Swamp Forest"},
2208 decoration = {"rp_default:swamp_grass"},
2209 y_min = 2,
2210 y_max = 40,
2213 minetest.register_decoration(
2215 deco_type = "simple",
2216 place_on = "rp_default:dirt_with_dry_grass",
2217 sidelen = 16,
2218 fill_ratio = 0.07,
2219 biomes = {"Desert", "Savanna", "Chaparral", "Savannic Wasteland"},
2220 decoration = {"rp_default:dry_grass"},
2221 y_min = 10,
2222 y_max = 500,
2225 if mg_name ~= "v6" then
2226 minetest.register_decoration(
2228 deco_type = "simple",
2229 place_on = "rp_default:dirt_with_grass",
2230 sidelen = 16,
2231 fill_ratio = 0.08,
2232 biomes = {"Forest", "Deep Forest", "Birch Forest", "Tall Birch Forest", "Oak Forest", "Dense Oak Forest", "Tall Oak Forest", "Mystery Forest"},
2233 decoration = {"rp_default:grass"},
2234 y_min = 0,
2235 y_max = 32000,
2238 minetest.register_decoration(
2240 deco_type = "simple",
2241 place_on = "rp_default:dirt_with_grass",
2242 sidelen = 16,
2243 fill_ratio = 0.08,
2244 biomes = {"Forest", "Marsh", "Grove", "Shrubbery", "Oak Shrubbery"},
2245 decoration = {"rp_default:tall_grass"},
2246 y_min = 0,
2247 y_max = 32000,
2250 minetest.register_decoration(
2252 deco_type = "simple",
2253 place_on = "rp_default:dirt_with_grass",
2254 sidelen = 16,
2255 fill_ratio = 0.15,
2256 biomes = {"Deep Forest", "Tall Oak Forest"},
2257 decoration = {"rp_default:tall_grass"},
2258 y_min = 0,
2259 y_max = 32000,
2262 minetest.register_decoration(
2264 deco_type = "simple",
2265 place_on = "rp_default:dirt_with_grass",
2266 sidelen = 16,
2267 fill_ratio = 0.05,
2268 biomes = {"Thorny Shrubs"},
2269 decoration = {"rp_default:tall_grass"},
2270 y_min = 0,
2271 y_max = 32000,
2273 minetest.register_decoration(
2275 deco_type = "simple",
2276 place_on = "rp_default:dirt_with_grass",
2277 sidelen = 16,
2278 fill_ratio = 0.1,
2279 biomes = {"Thorny Shrubs"},
2280 decoration = {"rp_default:grass"},
2281 y_min = 0,
2282 y_max = 32000,
2287 minetest.register_decoration(
2289 deco_type = "simple",
2290 place_on = "rp_default:dirt_with_grass",
2291 sidelen = 16,
2292 fill_ratio = 0.16,
2293 biomes = {"Wilderness", "Thorny Shrubs"},
2294 decoration = {"rp_default:grass"},
2295 y_min = -32000,
2296 y_max = 32000,
2299 minetest.register_decoration(
2301 deco_type = "simple",
2302 place_on = "rp_default:dirt_with_grass",
2303 sidelen = 16,
2304 fill_ratio = 0.12,
2305 biomes = {"Wilderness", "Thorny Shrubs"},
2306 decoration = {"rp_default:tall_grass"},
2307 y_min = -32000,
2308 y_max = 32000,
2311 -- Fern decorations
2313 minetest.register_decoration(
2315 deco_type = "simple",
2316 place_on = "rp_default:dirt_with_grass",
2317 sidelen = 16,
2318 fill_ratio = 0.02,
2319 biomes = {"Wilderness", "Grove", "Tall Oak Forest", "Mystery Forest"},
2320 decoration = {"rp_default:fern"},
2321 y_min = -32000,
2322 y_max = 32000,
2325 -- Clam decorations
2327 minetest.register_decoration(
2329 deco_type = "simple",
2330 place_on = {"rp_default:sand", "rp_default:gravel"},
2331 sidelen = 16,
2332 fill_ratio = 0.02,
2333 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"},
2334 decoration = {"rp_default:clam"},
2335 y_min = 0,
2336 y_max = 1,
2340 --[[ ORES ]]
2342 -- Graphite ore
2344 minetest.register_ore( -- Common above sea level mainly
2346 ore_type = "scatter",
2347 ore = "rp_default:stone_with_graphite",
2348 wherein = "rp_default:stone",
2349 clust_scarcity = 9*9*9,
2350 clust_num_ores = 8,
2351 clust_size = 8,
2352 y_min = -8,
2353 y_max = 32,
2356 minetest.register_ore( -- Slight scattering deeper down
2358 ore_type = "scatter",
2359 ore = "rp_default:stone_with_graphite",
2360 wherein = "rp_default:stone",
2361 clust_scarcity = 13*13*13,
2362 clust_num_ores = 6,
2363 clust_size = 8,
2364 y_min = -31000,
2365 y_max = -32,
2368 -- Coal ore
2370 minetest.register_ore( -- Even distribution
2372 ore_type = "scatter",
2373 ore = "rp_default:stone_with_coal",
2374 wherein = "rp_default:stone",
2375 clust_scarcity = 10*10*10,
2376 clust_num_ores = 8,
2377 clust_size = 4,
2378 y_min = -31000,
2379 y_max = 32,
2382 minetest.register_ore( -- Dense sheet
2384 ore_type = "scatter",
2385 ore = "rp_default:stone_with_coal",
2386 wherein = "rp_default:stone",
2387 clust_scarcity = 7*7*7,
2388 clust_num_ores = 10,
2389 clust_size = 8,
2390 y_min = -40,
2391 y_max = -32,
2394 minetest.register_ore( -- Deep ore sheet
2396 ore_type = "scatter",
2397 ore = "rp_default:stone_with_coal",
2398 wherein = "rp_default:stone",
2399 clust_scarcity = 6*6*6,
2400 clust_num_ores = 26,
2401 clust_size = 12,
2402 y_min = -130,
2403 y_max = -120,
2406 -- Iron ore
2408 minetest.register_ore( -- Even distribution
2410 ore_type = "scatter",
2411 ore = "rp_default:stone_with_iron",
2412 wherein = "rp_default:stone",
2413 clust_scarcity = 12*12*12,
2414 clust_num_ores = 4,
2415 clust_size = 3,
2416 y_min = -31000,
2417 y_max = -8,
2420 minetest.register_ore( -- Dense sheet
2422 ore_type = "scatter",
2423 ore = "rp_default:stone_with_iron",
2424 wherein = "rp_default:stone",
2425 clust_scarcity = 8*8*8,
2426 clust_num_ores = 20,
2427 clust_size = 12,
2428 y_min = -32,
2429 y_max = -24,
2432 minetest.register_ore( -- Dense sheet
2434 ore_type = "scatter",
2435 ore = "rp_default:stone_with_iron",
2436 wherein = "rp_default:stone",
2437 clust_scarcity = 7*7*7,
2438 clust_num_ores = 17,
2439 clust_size = 6,
2440 y_min = -80,
2441 y_max = -60,
2444 -- Tin ore
2446 minetest.register_ore( -- Even distribution
2448 ore_type = "scatter",
2449 ore = "rp_default:stone_with_tin",
2450 wherein = "rp_default:stone",
2451 clust_scarcity = 14*14*14,
2452 clust_num_ores = 8,
2453 clust_size = 4,
2454 y_min = -31000,
2455 y_max = -100,
2458 minetest.register_ore( -- Dense sheet
2460 ore_type = "scatter",
2461 ore = "rp_default:stone_with_tin",
2462 wherein = "rp_default:stone",
2463 clust_scarcity = 7*7*7,
2464 clust_num_ores = 10,
2465 clust_size = 6,
2466 y_min = -150,
2467 y_max = -140,
2470 -- Copper ore
2472 minetest.register_ore( -- Begin sheet
2474 ore_type = "scatter",
2475 ore = "rp_default:stone_with_copper",
2476 wherein = "rp_default:stone",
2477 clust_scarcity = 6*6*6,
2478 clust_num_ores = 12,
2479 clust_size = 5,
2480 y_min = -90,
2481 y_max = -80,
2484 minetest.register_ore( -- Rare even distribution
2486 ore_type = "scatter",
2487 ore = "rp_default:stone_with_copper",
2488 wherein = "rp_default:stone",
2489 clust_scarcity = 13*13*13,
2490 clust_num_ores = 10,
2491 clust_size = 5,
2492 y_min = -31000,
2493 y_max = -90,
2496 minetest.register_ore( -- Large clusters
2498 ore_type = "scatter",
2499 ore = "rp_default:stone_with_copper",
2500 wherein = "rp_default:stone",
2501 clust_scarcity = 8*8*8,
2502 clust_num_ores = 22,
2503 clust_size = 10,
2504 y_min = -230,
2505 y_max = -180,
2508 -- Small gravel blobs
2509 minetest.register_ore({
2510 ore_type = "blob",
2511 ore = "rp_default:gravel",
2512 wherein = "rp_default:stone",
2513 clust_scarcity = 10*10*10,
2514 clust_num_ores = 33,
2515 clust_size = 4,
2516 y_min = -31000,
2517 y_max = 31000,
2518 noise_params = {
2519 offset = 0,
2520 scale = 1,
2521 spread = {x=150, y=150, z=150},
2522 seed = 58943,
2523 octaves = 3,
2524 persist = 0.5,
2525 lacunarity = 2,
2526 flags = "defaults",
2530 -- Small sand blobs
2531 minetest.register_ore({
2532 ore_type = "blob",
2533 ore = "rp_default:sand",
2534 wherein = "rp_default:stone",
2535 clust_scarcity = 10*10*10,
2536 clust_num_ores = 40,
2537 clust_size = 4,
2538 y_min = -31000,
2539 y_max = 31000,
2540 noise_params = {
2541 offset = 0,
2542 scale = 1,
2543 spread = {x=150, y=150, z=150},
2544 seed = 38943,
2545 octaves = 3,
2546 persist = 0.5,
2547 lacunarity = 2,
2548 flags = "defaults",
2553 -- Dirt, Dry Dirt and Swamp Dirt blobs.
2554 -- These get generated depending on the biome.
2555 -- The following code is to generate the list
2556 -- of biomes that include either dirt, dry dirt or swamp dirt.
2558 -- Returns a list of biomes that use the specified nodename
2559 -- as its dirt blob, by using the data from
2560 -- default.get_biome_info.
2561 -- * nodename: A name of the node (a dirt node)
2562 local get_dirt_biomes = function(nodename)
2563 local biomes = default.get_core_biomes()
2564 local out_biomes = {}
2565 for b=1, #biomes do
2566 local biome_info = default.get_biome_info(biomes[b])
2567 -- Add biome to list iff it uses the specified node as dirt blob
2568 if biome_info.dirt_blob ~= nil and biome_info.dirt_blob == nodename then
2569 table.insert(out_biomes, biomes[b])
2572 return out_biomes
2575 local dirt_biomes = get_dirt_biomes("rp_default:dirt")
2576 local dry_dirt_biomes = get_dirt_biomes("rp_default:dry_dirt")
2577 local swamp_dirt_biomes = get_dirt_biomes("rp_default:swamp_dirt")
2579 minetest.log("verbose", "[rp_default] List of builtin biomes with Dirt blobs: "..dump(dirt_biomes))
2580 minetest.log("verbose", "[rp_default] List of builtin biomes with Dry Dirt blobs: "..dump(dry_dirt_biomes))
2581 minetest.log("verbose", "[rp_default] List of builtin biomes with Swamp Dirt blobs: "..dump(swamp_dirt_biomes))
2583 local np_dirtlike = {
2584 offset = 0,
2585 scale = 1,
2586 spread = {x=150, y=150, z=150},
2587 seed = 98943,
2588 octaves = 3,
2589 persist = 0.5,
2590 lacunarity = 2,
2591 flags = "defaults",
2594 minetest.register_ore({
2595 ore_type = "blob",
2596 ore = "rp_default:dirt",
2597 wherein = "rp_default:stone",
2598 clust_scarcity = 10*10*10,
2599 clust_num_ores = 33,
2600 clust_size = 4,
2601 y_min = -31000,
2602 y_max = 31000,
2603 biomes = dirt_biomes,
2604 noise_params = np_dirtlike,
2607 minetest.register_ore({
2608 ore_type = "blob",
2609 ore = "rp_default:dry_dirt",
2610 wherein = "rp_default:stone",
2611 clust_scarcity = 10*10*10,
2612 clust_num_ores = 33,
2613 clust_size = 4,
2614 y_min = -31000,
2615 y_max = 31000,
2616 biomes = dry_dirt_biomes,
2617 noise_params = np_dirtlike,
2620 minetest.register_ore({
2621 ore_type = "blob",
2622 ore = "rp_default:swamp_dirt",
2623 wherein = "rp_default:stone",
2624 clust_scarcity = 10*10*10,
2625 clust_num_ores = 33,
2626 clust_size = 4,
2627 y_min = -31000,
2628 y_max = 31000,
2629 biomes = swamp_dirt_biomes,
2630 noise_params = np_dirtlike,