6 -- Uncomment this to cut a big portion of ground out for visualizing ore spawning
9 local function on_generated(minp, maxp, blockseed)
10 for x = minp.x, maxp.x do
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})
25 minetest.register_on_generated(on_generated)
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")
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
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
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
83 newdef
.y_max
= orig_biome
.y_min
- 1
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
)
99 if mg_name
~= "v6" then
101 minetest
.register_biome(
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",
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",
144 default
.set_biome_info("Deep Forest", "grassy")
146 minetest
.register_biome(
150 node_top
= "rp_default:dirt_with_grass",
151 node_filler
= "rp_default:dirt",
152 node_riverbed
= "rp_default:sand",
164 register_ocean_and_beach("Forest", "rp_default:sand")
165 default
.set_biome_info("Forest", "grassy")
167 minetest
.register_biome(
171 node_top
= "rp_default:dirt_with_grass",
172 node_filler
= "rp_default:dirt",
173 node_riverbed
= "rp_default:sand",
185 register_ocean_and_beach("Grove", "rp_default:sand")
186 default
.set_biome_info("Grove", "grassy")
188 minetest
.register_biome(
192 node_top
= "rp_default:dirt_with_grass",
193 node_filler
= "rp_default:dirt",
194 node_riverbed
= "rp_default:sand",
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(
214 node_top
= "rp_default:dirt_with_grass",
215 node_filler
= "rp_default:dirt",
216 node_riverbed
= "rp_default:sand",
223 y_max
= ORCHARD_Y_MIN
- 1,
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(
236 node_top
= "rp_default:dirt_with_grass",
237 node_filler
= "rp_default:dirt",
238 node_riverbed
= "rp_default:sand",
244 y_min
= ORCHARD_Y_MIN
,
250 default
.set_biome_info("Orchard", "grassy")
252 -- Note: Shrubbery is below Chaparral
253 minetest
.register_biome(
257 node_top
= "rp_default:dirt_with_grass",
258 node_filler
= "rp_default:dirt",
259 node_riverbed
= "rp_default:sand",
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(
279 node_top
= "rp_default:dirt_with_dry_grass",
280 node_filler
= "rp_default:dry_dirt",
281 node_riverbed
= "rp_default:sand",
293 default
.set_biome_info("Chaparral", "savannic")
295 minetest
.register_biome(
299 node_top
= "rp_default:dirt_with_dry_grass",
300 node_filler
= "rp_default:dry_dirt",
301 node_riverbed
= "rp_default:gravel",
313 register_ocean_and_beach("Savanna", "rp_default:sand")
314 default
.set_biome_info("Savanna", "savannic")
316 minetest
.register_biome(
320 node_top
= "rp_default:sand",
321 node_filler
= "rp_default:sandstone",
322 node_riverbed
= "rp_default:sand",
323 node_dungeon
= "rp_default:sandstone",
335 register_ocean_and_beach("Desert", "rp_default:sand")
336 default
.set_biome_info("Desert", "desertic")
338 minetest
.register_biome(
342 node_top
= "rp_default:dry_dirt",
343 node_filler
= "rp_default:sandstone",
344 node_riverbed
= "rp_default:sandstone",
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",
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",
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",
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",
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",
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",
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",
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",
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",
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",
566 register_ocean_and_beach("Oak Shrubbery", "rp_default:dirt")
567 default
.set_biome_info("Oak Shrubbery", "grassy")
569 minetest
.register_biome(
573 node_top
= "rp_default:dirt_with_grass",
574 node_filler
= "rp_default:dirt",
575 node_riverbed
= "rp_default:gravel",
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",
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",
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",
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",
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",
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(
703 node_top
= "rp_default:dirt_with_swamp_grass",
704 node_filler
= "rp_default:swamp_dirt",
705 node_riverbed
= "rp_default:swamp_dirt",
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",
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",
748 y_max
= UNDERGROUND_Y_MAX
,
753 default
.set_biome_info("Underground", "undergroundy")
757 local function spring_ore_np(seed
)
761 spread
= {x
=250, y
=250, z
=250},
762 seed
= seed
or 12345,
772 minetest
.register_ore( -- Springs
775 ore
= "rp_default:water_source",
776 wherein
= "rp_default:dirt_with_grass",
777 biomes
= {"Grassland"},
778 clust_scarcity
= 26*26*26,
783 noise_params
= spring_ore_np(),
786 minetest
.register_ore( -- Pools
789 ore
= "rp_default:water_source",
790 wherein
= "rp_default:dirt_with_grass",
791 biomes
= {"Wilderness"},
792 clust_scarcity
= 32*32*32,
797 noise_params
= spring_ore_np(),
799 if mg_name
~= "v6" then
800 minetest
.register_ore( -- Swamp (big springs)
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,
811 noise_params
= spring_ore_np(13943),
813 minetest
.register_ore( -- Swamp (medium springs)
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,
824 noise_params
= spring_ore_np(49494),
827 minetest
.register_ore( -- Swamp (small springs)
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,
838 noise_params
= spring_ore_np(59330),
841 minetest
.register_ore( -- Marsh
844 ore
= "rp_default:swamp_water_source",
845 wherein
= {"rp_default:dirt_with_grass", "rp_default:dirt"},
847 clust_scarcity
= 8*8*8,
852 noise_params
= spring_ore_np(),
855 minetest
.register_ore(
858 ore
= "rp_default:gravel",
859 wherein
= "rp_default:dry_dirt",
860 biomes
= {"Rocky Dryland"},
861 clust_scarcity
= 8*8*8,
869 spread
= { x
= 100, y
= 100, z
= 100 },
875 minetest
.register_ore(
878 ore
= "rp_default:stone",
879 wherein
= "rp_default:dry_dirt",
880 biomes
= {"Rocky Dryland"},
881 clust_scarcity
= 8*8*8,
889 spread
= { x
= 100, y
= 100, z
= 100 },
896 minetest
.register_ore( -- Dry Swamp (dirt)
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,
907 noise_params
= spring_ore_np(13943),
909 minetest
.register_ore( -- Dry Swamp (dirt)
912 ore
= "rp_default:dirt",
913 wherein
= {"rp_default:swamp_dirt"},
914 biomes
= {"Dry Swamp"},
915 clust_scarcity
= 3*3*3,
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,
937 spread
= { x
= 100, y
= 100, z
= 100 },
944 minetest
.register_ore(
947 ore
= "rp_default:dirt_with_dry_grass",
948 wherein
= "rp_default:dry_dirt",
949 biomes
= {"Savannic Wasteland"},
950 clust_scarcity
= 7*7*7,
958 spread
= { x
= 100, y
= 100, z
= 100 },
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,
983 -- The decorations are roughly ordered by size;
984 -- largest decorations first.
988 if mg_name
~= "v6" then
989 minetest
.register_decoration(
991 name
= "rp_default:giga_birch_tree",
992 deco_type
= "schematic",
993 place_on
= {"rp_default:dirt_with_grass"},
996 biomes
= {"Deep Forest"},
997 flags
= "place_center_x, place_center_z",
998 schematic
= minetest
.get_modpath("rp_default")
999 .. "/schematics/rp_default_giga_birch_tree.mts",
1000 rotation
= "random",
1005 minetest
.register_decoration(
1007 deco_type
= "schematic",
1008 place_on
= {"rp_default:dirt_with_grass"},
1012 flags
= "place_center_x, place_center_z",
1013 schematic
= minetest
.get_modpath("rp_default")
1014 .. "/schematics/rp_default_tall_grove_tree.mts",
1019 minetest
.register_decoration(
1021 deco_type
= "schematic",
1022 place_on
= {"rp_default:dirt_with_grass"},
1025 biomes
= {"Forest"},
1026 flags
= "place_center_x, place_center_z",
1027 schematic
= minetest
.get_modpath("rp_default")
1028 .. "/schematics/rp_default_coniferlike_tree.mts",
1033 minetest
.register_decoration(
1035 deco_type
= "schematic",
1036 place_on
= {"rp_default:dirt_with_grass"},
1039 biomes
= {"Tall Birch Forest"},
1040 flags
= "place_center_x, place_center_z",
1041 schematic
= minetest
.get_modpath("rp_default")
1042 .. "/schematics/rp_default_birch_cuboid_tall.mts",
1047 minetest
.register_decoration(
1049 deco_type
= "schematic",
1050 place_on
= {"rp_default:dirt_with_grass"},
1053 biomes
= {"Forest"},
1054 flags
= "place_center_x, place_center_z",
1055 schematic
= minetest
.get_modpath("rp_default")
1056 .. "/schematics/rp_default_birch_cuboid_3x3_short.mts",
1061 minetest
.register_decoration(
1063 deco_type
= "schematic",
1064 place_on
= {"rp_default:dirt_with_grass"},
1066 fill_ratio
= 0.0003,
1067 biomes
= {"Birch Forest"},
1068 flags
= "place_center_x, place_center_z",
1069 schematic
= minetest
.get_modpath("rp_default")
1070 .. "/schematics/rp_default_birch_cuboid_5x4.mts",
1074 minetest
.register_decoration(
1076 deco_type
= "schematic",
1077 place_on
= {"rp_default:dirt_with_grass"},
1080 biomes
= {"Birch Forest"},
1081 flags
= "place_center_x, place_center_z",
1082 schematic
= minetest
.get_modpath("rp_default")
1083 .. "/schematics/rp_default_birch_cuboid_3x4.mts",
1087 minetest
.register_decoration(
1089 deco_type
= "schematic",
1090 place_on
= {"rp_default:dirt_with_grass"},
1093 biomes
= {"Birch Forest"},
1094 flags
= "place_center_x, place_center_z",
1095 schematic
= minetest
.get_modpath("rp_default")
1096 .. "/schematics/rp_default_birch_cuboid_3x3_long.mts",
1100 minetest
.register_decoration(
1102 deco_type
= "schematic",
1103 place_on
= {"rp_default:dirt_with_grass"},
1106 biomes
= {"Birch Forest"},
1107 flags
= "place_center_x, place_center_z",
1108 schematic
= minetest
.get_modpath("rp_default")
1109 .. "/schematics/rp_default_birch_cuboid_3x3_short.mts",
1113 minetest
.register_decoration(
1115 deco_type
= "schematic",
1116 place_on
= {"rp_default:dirt_with_grass"},
1118 fill_ratio
= 0.0001,
1119 biomes
= {"Birch Forest"},
1120 flags
= "place_center_x, place_center_z",
1121 schematic
= minetest
.get_modpath("rp_default")
1122 .. "/schematics/rp_default_birch_plus.mts",
1126 minetest
.register_decoration(
1128 deco_type
= "schematic",
1129 place_on
= {"rp_default:dirt_with_grass"},
1131 fill_ratio
= 0.0002,
1132 biomes
= {"Birch Forest"},
1133 flags
= "place_center_x, place_center_z",
1134 schematic
= minetest
.get_modpath("rp_default")
1135 .. "/schematics/rp_default_apple_tree_empty.mts",
1142 minetest
.register_decoration(
1144 deco_type
= "schematic",
1145 place_on
= {"rp_default:dirt_with_grass"},
1148 biomes
= {"Dry Swamp"},
1149 flags
= "place_center_x, place_center_z",
1150 schematic
= minetest
.get_modpath("rp_default")
1151 .. "/schematics/rp_default_birch_cuboid_3x3_short.mts",
1156 minetest
.register_decoration(
1158 deco_type
= "schematic",
1159 place_on
= {"rp_default:dirt_with_grass"},
1161 fill_ratio
= 0.00035,
1162 biomes
= {"Orchard"},
1163 flags
= "place_center_x, place_center_z",
1164 schematic
= minetest
.get_modpath("rp_default")
1165 .. "/schematics/rp_default_apple_tree_big.mts",
1170 minetest
.register_decoration(
1172 deco_type
= "schematic",
1173 place_on
= {"rp_default:dirt_with_grass"},
1176 biomes
= {"Orchard"},
1177 flags
= "place_center_x, place_center_z",
1178 schematic
= minetest
.get_modpath("rp_default")
1179 .. "/schematics/rp_default_apple_tree.mts",
1184 minetest
.register_decoration(
1186 deco_type
= "schematic",
1187 place_on
= {"rp_default:dirt_with_grass"},
1189 fill_ratio
= 0.000033,
1190 biomes
= {"Thorny Shrubs"},
1191 flags
= "place_center_x, place_center_z",
1192 schematic
= minetest
.get_modpath("rp_default")
1193 .. "/schematics/rp_default_apple_tree.mts",
1197 minetest
.register_decoration(
1199 deco_type
= "schematic",
1200 place_on
= {"rp_default:dirt_with_grass"},
1202 fill_ratio
= 0.00067,
1203 biomes
= {"Thorny Shrubs"},
1204 flags
= "place_center_x, place_center_z",
1205 schematic
= minetest
.get_modpath("rp_default")
1206 .. "/schematics/rp_default_apple_tree_empty.mts",
1212 minetest
.register_decoration(
1214 deco_type
= "schematic",
1215 place_on
= {"rp_default:dirt_with_grass"},
1218 biomes
= {"Forest", "Deep Forest"},
1219 flags
= "place_center_x, place_center_z",
1220 schematic
= minetest
.get_modpath("rp_default")
1221 .. "/schematics/rp_default_apple_tree.mts",
1226 minetest
.register_decoration(
1228 deco_type
= "schematic",
1229 place_on
= {"rp_default:dirt_with_grass"},
1231 fill_ratio
= 0.0009,
1232 biomes
= {"Oak Forest"},
1233 flags
= "place_center_x, place_center_z",
1234 schematic
= minetest
.get_modpath("rp_default")
1235 .. "/schematics/rp_default_oak_tree_big_1.mts",
1240 minetest
.register_decoration(
1242 deco_type
= "schematic",
1243 place_on
= {"rp_default:dirt_with_grass"},
1245 fill_ratio
= 0.0045,
1246 biomes
= {"Tall Oak Forest"},
1247 flags
= "place_center_x, place_center_z",
1248 schematic
= minetest
.get_modpath("rp_default")
1249 .. "/schematics/rp_default_oak_tree_big_1.mts",
1253 minetest
.register_decoration(
1255 deco_type
= "schematic",
1256 place_on
= {"rp_default:dirt_with_grass"},
1258 fill_ratio
= 0.0045,
1259 biomes
= {"Tall Oak Forest"},
1260 flags
= "place_center_x, place_center_z",
1261 schematic
= minetest
.get_modpath("rp_default")
1262 .. "/schematics/rp_default_oak_tree_big_2.mts",
1268 minetest
.register_decoration(
1270 deco_type
= "schematic",
1271 place_on
= {"rp_default:dirt_with_grass"},
1274 biomes
= {"Dense Oak Forest"},
1275 flags
= "place_center_x, place_center_z",
1276 schematic
= minetest
.get_modpath("rp_default")
1277 .. "/schematics/rp_default_oak_tree_big_1.mts",
1281 minetest
.register_decoration(
1283 deco_type
= "schematic",
1284 place_on
= {"rp_default:dirt_with_grass"},
1287 biomes
= {"Dense Oak Forest"},
1288 flags
= "place_center_x, place_center_z",
1289 schematic
= minetest
.get_modpath("rp_default")
1290 .. "/schematics/rp_default_oak_tree_big_2.mts",
1297 minetest
.register_decoration(
1299 deco_type
= "schematic",
1300 place_on
= {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
1302 fill_ratio
= 0.0008,
1303 biomes
= {"Mixed Swamp", "Mixed Swamp Beach"},
1304 flags
= "place_center_x, place_center_z",
1305 schematic
= minetest
.get_modpath("rp_default")
1306 .. "/schematics/rp_default_swamp_oak.mts",
1311 minetest
.register_decoration(
1313 deco_type
= "schematic",
1314 place_on
= {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
1317 biomes
= {"Swamp Forest", "Swamp Forest Beach"},
1318 flags
= "place_center_x, place_center_z",
1319 schematic
= minetest
.get_modpath("rp_default")
1320 .. "/schematics/rp_default_swamp_oak.mts",
1325 minetest
.register_decoration(
1327 deco_type
= "schematic",
1328 place_on
= {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt", "rp_default:dirt"},
1330 fill_ratio
= 0.0001,
1331 biomes
= {"Swamp Forest", "Swamp Forest Beach"},
1332 flags
= "place_center_x, place_center_z",
1333 schematic
= minetest
.get_modpath("rp_default")
1334 .. "/schematics/rp_default_swamp_birch.mts",
1338 minetest
.register_decoration(
1340 deco_type
= "schematic",
1341 place_on
= {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt", "rp_default:dirt"},
1344 biomes
= {"Dry Swamp", "Dry Swamp Beach"},
1345 flags
= "place_center_x, place_center_z",
1346 schematic
= minetest
.get_modpath("rp_default")
1347 .. "/schematics/rp_default_swamp_birch.mts",
1354 local MYSTERY_FOREST_SPREAD
= { x
=500, y
=500, z
=500 }
1355 local MYSTERY_FOREST_OFFSET
= 0.001
1356 local MYSTERY_FOREST_OFFSET_STAIRCASE
= -0.001
1357 local MYSTERY_FOREST_OFFSET_APPLES
= -0.0005
1358 local MYSTERY_FOREST_SCALE
= 0.008
1360 minetest
.register_decoration(
1362 deco_type
= "schematic",
1363 place_on
= {"rp_default:dirt_with_grass"},
1365 biomes
= {"Mystery Forest"},
1366 flags
= "place_center_x, place_center_z",
1367 schematic
= minetest
.get_modpath("rp_default")
1368 .. "/schematics/rp_default_staircase_tree.mts",
1373 scale
= -MYSTERY_FOREST_SCALE
,
1374 offset
= MYSTERY_FOREST_OFFSET_STAIRCASE
,
1375 spread
= MYSTERY_FOREST_SPREAD
,
1382 minetest
.register_decoration(
1384 deco_type
= "schematic",
1385 place_on
= {"rp_default:dirt_with_grass"},
1387 biomes
= {"Mystery Forest"},
1388 flags
= "place_center_x, place_center_z",
1389 schematic
= minetest
.get_modpath("rp_default")
1390 .. "/schematics/rp_default_layer_birch.mts",
1395 scale
= MYSTERY_FOREST_SCALE
,
1396 offset
= MYSTERY_FOREST_OFFSET
,
1397 spread
= MYSTERY_FOREST_SPREAD
,
1404 minetest
.register_decoration(
1406 deco_type
= "schematic",
1407 place_on
= {"rp_default:dirt_with_grass"},
1409 biomes
= {"Mystery Forest"},
1410 flags
= "place_center_x, place_center_z",
1411 schematic
= minetest
.get_modpath("rp_default")
1412 .. "/schematics/rp_default_telephone_tree.mts",
1417 scale
= -MYSTERY_FOREST_SCALE
,
1418 offset
= MYSTERY_FOREST_OFFSET
,
1419 spread
= MYSTERY_FOREST_SPREAD
,
1426 minetest
.register_decoration(
1428 deco_type
= "schematic",
1429 place_on
= {"rp_default:dirt_with_grass"},
1431 biomes
= {"Mystery Forest"},
1432 flags
= "place_center_x, place_center_z",
1433 schematic
= minetest
.get_modpath("rp_default")
1434 .. "/schematics/rp_default_telephone_tree_apples.mts",
1439 scale
= -MYSTERY_FOREST_SCALE
,
1440 offset
= MYSTERY_FOREST_OFFSET_APPLES
,
1441 spread
= MYSTERY_FOREST_SPREAD
,
1451 minetest
.register_decoration(
1453 deco_type
= "schematic",
1454 place_on
= {"rp_default:dirt_with_grass"},
1456 biomes
= {"Mystery Forest"},
1457 flags
= "place_center_x, place_center_z",
1458 schematic
= minetest
.get_modpath("rp_default")
1459 .. "/schematics/rp_default_cross_birch.mts",
1464 scale
= MYSTERY_FOREST_SCALE
,
1465 offset
= MYSTERY_FOREST_OFFSET
,
1466 spread
= MYSTERY_FOREST_SPREAD
,
1473 minetest
.register_decoration(
1475 deco_type
= "schematic",
1476 place_on
= {"rp_default:dirt_with_grass"},
1478 biomes
= {"Poplar Plains"},
1479 flags
= "place_center_x, place_center_z",
1480 schematic
= minetest
.get_modpath("rp_default")
1481 .. "/schematics/rp_default_poplar_large.mts",
1488 spread
= {x
=50,y
=50,z
=50},
1494 minetest
.register_decoration(
1496 deco_type
= "schematic",
1497 place_on
= {"rp_default:dirt_with_grass"},
1499 biomes
= {"Poplar Plains"},
1500 flags
= "place_center_x, place_center_z",
1501 schematic
= minetest
.get_modpath("rp_default")
1502 .. "/schematics/rp_default_poplar_small.mts",
1509 spread
= {x
=50,y
=50,z
=50},
1515 minetest
.register_decoration(
1517 deco_type
= "schematic",
1518 place_on
= {"rp_default:dirt_with_grass"},
1519 fill_ratio
= 0.0002,
1521 biomes
= {"Poplar Plains"},
1522 flags
= "place_center_x, place_center_z",
1523 schematic
= minetest
.get_modpath("rp_default")
1524 .. "/schematics/rp_default_poplar_small.mts",
1529 -- Small poplar tree blobs
1530 minetest
.register_decoration(
1532 deco_type
= "schematic",
1533 place_on
= {"rp_default:dirt_with_grass"},
1535 biomes
= {"Baby Poplar Plains"},
1536 flags
= "place_center_x, place_center_z",
1537 schematic
= minetest
.get_modpath("rp_default")
1538 .. "/schematics/rp_default_poplar_small.mts",
1545 spread
= {x
=24,y
=24,z
=24},
1552 -- Occasional lonely poplars
1553 minetest
.register_decoration(
1555 deco_type
= "schematic",
1556 place_on
= {"rp_default:dirt_with_grass"},
1558 fill_ratio
= 0.0002,
1559 biomes
= {"Baby Poplar Plains"},
1560 flags
= "place_center_x, place_center_z",
1561 schematic
= minetest
.get_modpath("rp_default")
1562 .. "/schematics/rp_default_poplar_small.mts",
1569 minetest
.register_decoration(
1571 deco_type
= "schematic",
1572 place_on
= {"rp_default:dirt_with_grass"},
1575 biomes
= {"Birch Forest"},
1576 flags
= "place_center_x, place_center_z",
1577 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_birch_bush.mts",
1583 minetest
.register_decoration(
1585 deco_type
= "schematic",
1586 place_on
= {"rp_default:dirt_with_grass"},
1588 biomes
= {"Baby Poplar Plains"},
1589 flags
= "place_center_x, place_center_z",
1590 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
1597 offset
= -0.0000001,
1598 spread
= { x
= 50, y
= 50, z
= 50 },
1605 minetest
.register_decoration(
1607 deco_type
= "schematic",
1608 place_on
= {"rp_default:dirt_with_grass"},
1610 biomes
= {"Thorny Shrubs"},
1611 flags
= "place_center_x, place_center_z",
1612 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
1620 spread
= { x
= 82, y
= 82, z
= 82 },
1627 minetest
.register_decoration(
1629 deco_type
= "schematic",
1630 place_on
= {"rp_default:dirt_with_grass"},
1633 biomes
= {"Shrubbery"},
1634 flags
= "place_center_x, place_center_z",
1635 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
1641 -- Wilderness apple trees: 50/50 split between
1642 -- trees with apples and those without.
1643 minetest
.register_decoration(
1645 deco_type
= "schematic",
1646 place_on
= {"rp_default:dirt_with_grass"},
1649 biomes
= {"Wilderness"},
1650 flags
= "place_center_x, place_center_z",
1651 schematic
= minetest
.get_modpath("rp_default")
1652 .. "/schematics/rp_default_apple_tree.mts",
1656 minetest
.register_decoration(
1658 deco_type
= "schematic",
1659 place_on
= {"rp_default:dirt_with_grass"},
1662 biomes
= {"Wilderness"},
1663 flags
= "place_center_x, place_center_z",
1664 schematic
= minetest
.get_modpath("rp_default")
1665 .. "/schematics/rp_default_apple_tree_empty.mts",
1670 minetest
.register_decoration(
1672 deco_type
= "schematic",
1673 place_on
= {"rp_default:dirt_with_grass", "rp_default:dirt"},
1675 fill_ratio
= 0.0001,
1676 biomes
= {"Dry Swamp"},
1677 flags
= "place_center_x, place_center_z",
1678 schematic
= minetest
.get_modpath("rp_default")
1679 .. "/schematics/rp_default_apple_tree.mts",
1684 minetest
.register_decoration(
1686 deco_type
= "schematic",
1687 place_on
= {"rp_default:dirt_with_grass"},
1690 biomes
= {"Wilderness"},
1691 flags
= "place_center_x, place_center_z",
1692 schematic
= minetest
.get_modpath("rp_default")
1693 .. "/schematics/rp_default_oak_tree.mts",
1699 minetest
.register_decoration(
1701 deco_type
= "schematic",
1702 place_on
= {"rp_default:dirt_with_grass"},
1705 biomes
= {"Oak Shrubbery"},
1706 flags
= "place_center_x, place_center_z",
1707 schematic
= minetest
.get_modpath("rp_default")
1708 .. "/schematics/rp_default_oak_tree.mts",
1713 minetest
.register_decoration(
1715 deco_type
= "schematic",
1716 place_on
= {"rp_default:dirt_with_grass"},
1719 biomes
= {"Dense Oak Forest"},
1720 flags
= "place_center_x, place_center_z",
1721 schematic
= minetest
.get_modpath("rp_default")
1722 .. "/schematics/rp_default_oak_tree.mts",
1727 minetest
.register_decoration(
1729 deco_type
= "schematic",
1730 place_on
= {"rp_default:dirt_with_grass"},
1732 fill_ratio
= 0.0225,
1733 biomes
= {"Oak Forest"},
1734 flags
= "place_center_x, place_center_z",
1735 schematic
= minetest
.get_modpath("rp_default")
1736 .. "/schematics/rp_default_oak_tree.mts",
1741 minetest
.register_decoration(
1743 deco_type
= "schematic",
1744 place_on
= {"rp_default:dirt_with_grass"},
1746 fill_ratio
= 0.0015,
1747 biomes
= {"Tall Oak Forest"},
1748 flags
= "place_center_x, place_center_z",
1749 schematic
= minetest
.get_modpath("rp_default")
1750 .. "/schematics/rp_default_oak_tree.mts",
1759 -- Cactus decorations
1761 minetest
.register_decoration(
1763 deco_type
= "schematic",
1764 place_on
= {"rp_default:sand"},
1767 biomes
= {"Desert"},
1768 flags
= "place_center_x, place_center_z",
1769 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_cactus.mts",
1772 rotation
= "random",
1777 if mg_name
~= "v6" then
1778 minetest
.register_decoration(
1780 deco_type
= "schematic",
1781 place_on
= {"rp_default:dry_dirt"},
1784 biomes
= {"Wasteland"},
1785 flags
= "place_center_x, place_center_z",
1786 schematic
= minetest
.get_modpath("rp_default")
1787 .. "/schematics/rp_default_small_rock.mts",
1790 rotation
= "random",
1793 minetest
.register_decoration(
1795 deco_type
= "schematic",
1796 place_on
= {"rp_default:dry_dirt"},
1799 biomes
= {"Wasteland"},
1800 flags
= "place_center_x, place_center_z",
1801 schematic
= minetest
.get_modpath("rp_default")
1802 .. "/schematics/rp_default_large_rock.mts",
1805 rotation
= "random",
1808 minetest
.register_decoration(
1810 deco_type
= "schematic",
1811 place_on
= {"rp_default:stone", "rp_default:dry_dirt"},
1814 biomes
= {"Rocky Dryland"},
1815 flags
= "place_center_x, place_center_z",
1816 schematic
= minetest
.get_modpath("rp_default")
1817 .. "/schematics/rp_default_small_rock.mts",
1820 rotation
= "random",
1823 minetest
.register_decoration(
1825 deco_type
= "schematic",
1826 place_on
= {"rp_default:dry_dirt", "rp_default:dirt_with_dry_grass"},
1829 biomes
= {"Savannic Wasteland"},
1830 flags
= "place_center_x, place_center_z",
1831 schematic
= minetest
.get_modpath("rp_default")
1832 .. "/schematics/rp_default_small_rock.mts",
1835 rotation
= "random",
1839 -- Sulfur decorations
1841 minetest
.register_decoration(
1843 deco_type
= "simple",
1844 place_on
= "rp_default:dry_dirt",
1847 biomes
= {"Wasteland"},
1848 decoration
= {"rp_default:stone_with_sulfur"},
1853 -- Tiny tree decorations
1855 minetest
.register_decoration(
1857 deco_type
= "schematic",
1858 place_on
= {"rp_default:dry_dirt"},
1860 fill_ratio
= 0.0001,
1861 biomes
= {"Rocky Dryland"},
1862 flags
= "place_center_x, place_center_z",
1863 schematic
= minetest
.get_modpath("rp_default")
1864 .. "/schematics/rp_default_tiny_birch.mts",
1869 minetest
.register_decoration(
1871 deco_type
= "schematic",
1872 place_on
= {"rp_default:dry_dirt"},
1874 fill_ratio
= 0.00025,
1875 biomes
= {"Rocky Dryland"},
1876 flags
= "place_center_x, place_center_z",
1877 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_3layer.mts",
1881 minetest
.register_decoration(
1883 deco_type
= "schematic",
1884 place_on
= {"rp_default:dry_dirt"},
1886 fill_ratio
= 0.00025,
1887 biomes
= {"Rocky Dryland"},
1888 flags
= "place_center_x, place_center_z",
1889 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_2layer.mts",
1893 minetest
.register_decoration(
1895 deco_type
= "schematic",
1896 place_on
= {"rp_default:dry_dirt"},
1899 biomes
= {"Rocky Dryland"},
1900 flags
= "place_center_x, place_center_z",
1901 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
1905 minetest
.register_decoration(
1907 deco_type
= "schematic",
1908 place_on
= {"rp_default:dry_dirt"},
1910 fill_ratio
= 0.0001,
1911 biomes
= {"Rocky Dryland"},
1912 flags
= "place_center_x, place_center_z",
1913 schematic
= minetest
.get_modpath("rp_default")
1914 .. "/schematics/rp_default_tiny_birch.mts",
1919 minetest
.register_decoration(
1921 deco_type
= "schematic",
1922 place_on
= {"rp_default:dry_dirt"},
1924 fill_ratio
= 0.00025,
1925 biomes
= {"Rocky Dryland"},
1926 flags
= "place_center_x, place_center_z",
1927 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_3layer.mts",
1931 minetest
.register_decoration(
1933 deco_type
= "schematic",
1934 place_on
= {"rp_default:dry_dirt"},
1936 fill_ratio
= 0.00025,
1937 biomes
= {"Rocky Dryland"},
1938 flags
= "place_center_x, place_center_z",
1939 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_2layer.mts",
1943 minetest
.register_decoration(
1945 deco_type
= "schematic",
1946 place_on
= {"rp_default:dry_dirt"},
1949 biomes
= {"Rocky Dryland"},
1950 flags
= "place_center_x, place_center_z",
1951 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
1956 minetest
.register_decoration(
1958 deco_type
= "schematic",
1959 place_on
= {"rp_default:dry_dirt"},
1962 biomes
= {"Wooded Dryland"},
1963 flags
= "place_center_x, place_center_z",
1964 schematic
= minetest
.get_modpath("rp_default")
1965 .. "/schematics/rp_default_tiny_oak.mts",
1970 minetest
.register_decoration(
1972 deco_type
= "schematic",
1973 place_on
= {"rp_default:dry_dirt"},
1976 biomes
= {"Wooded Dryland"},
1977 flags
= "place_center_x, place_center_z",
1978 schematic
= minetest
.get_modpath("rp_default")
1979 .. "/schematics/rp_default_tiny_birch.mts",
1985 minetest
.register_decoration(
1987 deco_type
= "schematic",
1988 place_on
= {"rp_default:dry_dirt"},
1990 fill_ratio
= 0.0002,
1991 biomes
= {"Savannic Wasteland"},
1992 flags
= "place_center_x, place_center_z",
1993 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
2000 -- Bush/shrub decorations
2002 minetest
.register_decoration(
2004 deco_type
= "schematic",
2005 place_on
= {"rp_default:dirt_with_grass"},
2007 fill_ratio
= 0.0075,
2008 biomes
= {"Oak Shrubbery"},
2009 flags
= "place_center_x, place_center_z",
2010 schematic
= minetest
.get_modpath("rp_default")
2011 .. "/schematics/rp_default_oak_bush_wide.mts",
2016 minetest
.register_decoration(
2018 deco_type
= "schematic",
2019 place_on
= {"rp_default:dirt_with_grass"},
2022 biomes
= {"Dense Oak Forest"},
2023 flags
= "place_center_x, place_center_z",
2024 schematic
= minetest
.get_modpath("rp_default")
2025 .. "/schematics/rp_default_oak_bush_wide.mts",
2030 minetest
.register_decoration(
2032 deco_type
= "schematic",
2033 place_on
= {"rp_default:dirt_with_grass"},
2036 biomes
= {"Oak Forest"},
2037 flags
= "place_center_x, place_center_z",
2038 schematic
= minetest
.get_modpath("rp_default")
2039 .. "/schematics/rp_default_oak_bush_wide.mts",
2044 minetest
.register_decoration(
2046 deco_type
= "schematic",
2047 place_on
= {"rp_default:dirt_with_dry_grass"},
2050 biomes
= {"Savanna", "Chaparral"},
2051 flags
= "place_center_x, place_center_z",
2052 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush_small.mts",
2058 minetest
.register_decoration(
2060 deco_type
= "schematic",
2061 place_on
= {"rp_default:dirt_with_dry_grass"},
2063 fill_ratio
= 0.0025,
2064 biomes
= {"Savannic Wasteland"},
2065 flags
= "place_center_x, place_center_z",
2066 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush_small.mts",
2072 minetest
.register_decoration(
2074 deco_type
= "schematic",
2075 place_on
= {"rp_default:dry_dirt"},
2078 biomes
= {"Rocky Dryland", "Wooded Dryland"},
2079 flags
= "place_center_x, place_center_z",
2080 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush_small.mts",
2085 minetest
.register_decoration(
2087 deco_type
= "schematic",
2088 place_on
= {"rp_default:dirt_with_dry_grass"},
2091 biomes
= {"Chaparral"},
2092 flags
= "place_center_x, place_center_z",
2093 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush.mts",
2098 minetest
.register_decoration(
2100 deco_type
= "schematic",
2101 place_on
= {"rp_default:dirt_with_grass"},
2103 biomes
= {"Thorny Shrubs"},
2104 flags
= "place_center_x, place_center_z",
2105 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush.mts",
2113 spread
= { x
= 82, y
= 82, z
= 82 },
2121 minetest
.register_decoration(
2123 deco_type
= "schematic",
2124 place_on
= {"rp_default:dirt_with_grass"},
2126 fill_ratio
= 0.0003,
2127 biomes
= {"Oak Shrubbery"},
2128 flags
= "place_center_x, place_center_z",
2129 schematic
= minetest
.get_modpath("rp_default")
2130 .. "/schematics/rp_default_normal_bush_small.mts",
2135 minetest
.register_decoration(
2137 deco_type
= "schematic",
2138 place_on
= {"rp_default:dirt_with_grass"},
2141 biomes
= {"Shrubbery"},
2142 flags
= "place_center_x, place_center_z",
2143 schematic
= minetest
.get_modpath("rp_default")
2144 .. "/schematics/rp_default_normal_bush_small.mts",
2151 minetest
.register_decoration(
2153 deco_type
= "schematic",
2154 place_on
= {"rp_default:dirt_with_grass"},
2158 flags
= "place_center_x, place_center_z",
2159 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
2164 minetest
.register_decoration(
2166 deco_type
= "schematic",
2167 place_on
= {"rp_default:dirt_with_grass"},
2169 fill_ratio
= 0.0004,
2170 biomes
= {"Wilderness"},
2171 flags
= "place_center_x, place_center_z",
2172 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush.mts",
2177 minetest
.register_decoration(
2179 deco_type
= "schematic",
2180 place_on
= {"rp_default:dirt_with_grass"},
2182 fill_ratio
= 0.0036,
2183 biomes
= {"Wilderness"},
2184 flags
= "place_center_x, place_center_z",
2185 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
2193 -- Thistle decorations
2195 minetest
.register_decoration(
2197 deco_type
= "simple",
2198 place_on
= "rp_default:dirt_with_grass",
2201 biomes
= {"Wilderness"},
2202 decoration
= {"rp_default:thistle"},
2207 minetest
.register_decoration(
2209 deco_type
= "simple",
2210 place_on
= {"rp_default:dirt_with_grass", "rp_default:dry_dirt"},
2212 biomes
= {"Thorny Shrubs"},
2213 decoration
= {"rp_default:thistle"},
2221 spread
= { x
= 12, y
= 12, z
= 12 },
2228 -- Papyrus decorations
2231 minetest
.register_decoration(
2233 deco_type
= "simple",
2234 place_on
= {"rp_default:sand", "rp_default:dirt", "rp_default:dirt_with_grass"},
2235 spawn_by
= {"rp_default:water_source", "rp_default:water_flowing"},
2239 biomes
= {"Grassland Ocean", "Grassland", "Forest Ocean", "Forest", "Wilderness Ocean", "Wilderness", "Birch Forest Ocean", "Tall Birch Forest Ocean", "Marsh Beach"},
2240 decoration
= {"rp_default:papyrus"},
2246 -- Grassland papyrus
2247 minetest
.register_decoration(
2249 deco_type
= "simple",
2250 place_on
= {"rp_default:dirt_with_grass"},
2251 spawn_by
= {"group:water"},
2255 biomes
= {"Grassland", "Marsh", "Forest", "Deep Forest", "Wilderness", "Baby Poplar Plains"},
2256 decoration
= {"rp_default:papyrus"},
2265 minetest
.register_decoration(
2267 deco_type
= "simple",
2268 place_on
= {"rp_default:swamp_dirt", "rp_default:dirt_with_swamp_grass"},
2269 spawn_by
= {"group:water"},
2273 biomes
= {"Mixed Swamp"},
2274 decoration
= {"rp_default:papyrus"},
2281 minetest
.register_decoration(
2283 deco_type
= "simple",
2284 place_on
= {"rp_default:swamp_dirt", "rp_default:dirt_with_swamp_grass"},
2285 spawn_by
= {"group:water"},
2289 biomes
= {"Papyrus Swamp"},
2290 decoration
= {"rp_default:papyrus"},
2297 -- Flower decorations
2299 minetest
.register_decoration(
2301 deco_type
= "simple",
2302 place_on
= "rp_default:dirt_with_grass",
2305 biomes
= {"Grassland", "Wilderness", "Orchard", "Baby Poplar Plains", "Birch Forest"},
2306 decoration
= {"rp_default:flower"},
2311 -- Grass decorations
2313 if mg_name
~= "v6" then
2314 minetest
.register_decoration(
2316 deco_type
= "simple",
2317 place_on
= "rp_default:dirt_with_grass",
2320 biomes
= {"Grassland", "Orchard", "Swamp Meadow", "Baby Poplar Plains", "Poplar Plains", "Shrubbery", "Oak Shrubbery", "Thorny Shrubs", "Dry Swamp"},
2321 decoration
= {"rp_default:grass"},
2327 minetest
.register_decoration(
2329 deco_type
= "simple",
2330 place_on
= "rp_default:dirt_with_swamp_grass",
2333 biomes
= {"Mixed Swamp", "Dry Swamp", "Swamp Meadow", "Swamp Papyrus", "Swamp Forest"},
2334 decoration
= {"rp_default:swamp_grass"},
2339 minetest
.register_decoration(
2341 deco_type
= "simple",
2342 place_on
= "rp_default:dirt_with_dry_grass",
2345 biomes
= {"Desert", "Savanna", "Chaparral", "Savannic Wasteland"},
2346 decoration
= {"rp_default:dry_grass"},
2351 if mg_name
~= "v6" then
2352 minetest
.register_decoration(
2354 deco_type
= "simple",
2355 place_on
= "rp_default:dirt_with_grass",
2358 biomes
= {"Forest", "Deep Forest", "Birch Forest", "Tall Birch Forest", "Oak Forest", "Dense Oak Forest", "Tall Oak Forest", "Mystery Forest"},
2359 decoration
= {"rp_default:grass"},
2364 minetest
.register_decoration(
2366 deco_type
= "simple",
2367 place_on
= "rp_default:dirt_with_grass",
2370 biomes
= {"Forest", "Marsh", "Grove", "Shrubbery", "Oak Shrubbery"},
2371 decoration
= {"rp_default:tall_grass"},
2376 minetest
.register_decoration(
2378 deco_type
= "simple",
2379 place_on
= "rp_default:dirt_with_grass",
2382 biomes
= {"Deep Forest", "Tall Oak Forest"},
2383 decoration
= {"rp_default:tall_grass"},
2388 minetest
.register_decoration(
2390 deco_type
= "simple",
2391 place_on
= "rp_default:dirt_with_grass",
2394 biomes
= {"Thorny Shrubs"},
2395 decoration
= {"rp_default:tall_grass"},
2399 minetest
.register_decoration(
2401 deco_type
= "simple",
2402 place_on
= "rp_default:dirt_with_grass",
2405 biomes
= {"Thorny Shrubs"},
2406 decoration
= {"rp_default:grass"},
2413 minetest
.register_decoration(
2415 deco_type
= "simple",
2416 place_on
= "rp_default:dirt_with_grass",
2419 biomes
= {"Wilderness", "Thorny Shrubs"},
2420 decoration
= {"rp_default:grass"},
2425 minetest
.register_decoration(
2427 deco_type
= "simple",
2428 place_on
= "rp_default:dirt_with_grass",
2431 biomes
= {"Wilderness", "Thorny Shrubs"},
2432 decoration
= {"rp_default:tall_grass"},
2439 minetest
.register_decoration(
2441 deco_type
= "simple",
2442 place_on
= "rp_default:dirt_with_grass",
2445 biomes
= {"Wilderness", "Grove", "Tall Oak Forest", "Mystery Forest"},
2446 decoration
= {"rp_default:fern"},
2453 minetest
.register_decoration(
2455 deco_type
= "simple",
2456 place_on
= {"rp_default:sand", "rp_default:gravel"},
2459 biomes
= {"Grassland Ocean", "Wasteland Beach", "Forest Ocean", "Wilderness Ocean", "Grove Ocean", "Thorny Shrubs Ocean", "Birch Forest Ocean", "Tall Birch Forest Ocean", "Savanna Ocean", "Rocky Dryland Ocean", "Savannic Wasteland Ocean", "Desert Ocean", "Baby Poplar Plains"},
2460 decoration
= {"rp_default:clam"},
2470 minetest
.register_ore( -- Common above sea level mainly
2472 ore_type
= "scatter",
2473 ore
= "rp_default:stone_with_graphite",
2474 wherein
= "rp_default:stone",
2475 clust_scarcity
= 9*9*9,
2482 minetest
.register_ore( -- Slight scattering deeper down
2484 ore_type
= "scatter",
2485 ore
= "rp_default:stone_with_graphite",
2486 wherein
= "rp_default:stone",
2487 clust_scarcity
= 13*13*13,
2496 minetest
.register_ore( -- Even distribution
2498 ore_type
= "scatter",
2499 ore
= "rp_default:stone_with_coal",
2500 wherein
= "rp_default:stone",
2501 clust_scarcity
= 10*10*10,
2508 minetest
.register_ore( -- Dense sheet
2510 ore_type
= "scatter",
2511 ore
= "rp_default:stone_with_coal",
2512 wherein
= "rp_default:stone",
2513 clust_scarcity
= 7*7*7,
2514 clust_num_ores
= 10,
2520 minetest
.register_ore( -- Deep ore sheet
2522 ore_type
= "scatter",
2523 ore
= "rp_default:stone_with_coal",
2524 wherein
= "rp_default:stone",
2525 clust_scarcity
= 6*6*6,
2526 clust_num_ores
= 26,
2534 minetest
.register_ore( -- Even distribution
2536 ore_type
= "scatter",
2537 ore
= "rp_default:stone_with_iron",
2538 wherein
= "rp_default:stone",
2539 clust_scarcity
= 12*12*12,
2546 minetest
.register_ore( -- Dense sheet
2548 ore_type
= "scatter",
2549 ore
= "rp_default:stone_with_iron",
2550 wherein
= "rp_default:stone",
2551 clust_scarcity
= 8*8*8,
2552 clust_num_ores
= 20,
2558 minetest
.register_ore( -- Dense sheet
2560 ore_type
= "scatter",
2561 ore
= "rp_default:stone_with_iron",
2562 wherein
= "rp_default:stone",
2563 clust_scarcity
= 7*7*7,
2564 clust_num_ores
= 17,
2572 minetest
.register_ore( -- Even distribution
2574 ore_type
= "scatter",
2575 ore
= "rp_default:stone_with_tin",
2576 wherein
= "rp_default:stone",
2577 clust_scarcity
= 14*14*14,
2584 minetest
.register_ore( -- Dense sheet
2586 ore_type
= "scatter",
2587 ore
= "rp_default:stone_with_tin",
2588 wherein
= "rp_default:stone",
2589 clust_scarcity
= 7*7*7,
2590 clust_num_ores
= 10,
2598 minetest
.register_ore( -- Begin sheet
2600 ore_type
= "scatter",
2601 ore
= "rp_default:stone_with_copper",
2602 wherein
= "rp_default:stone",
2603 clust_scarcity
= 6*6*6,
2604 clust_num_ores
= 12,
2610 minetest
.register_ore( -- Rare even distribution
2612 ore_type
= "scatter",
2613 ore
= "rp_default:stone_with_copper",
2614 wherein
= "rp_default:stone",
2615 clust_scarcity
= 13*13*13,
2616 clust_num_ores
= 10,
2622 minetest
.register_ore( -- Large clusters
2624 ore_type
= "scatter",
2625 ore
= "rp_default:stone_with_copper",
2626 wherein
= "rp_default:stone",
2627 clust_scarcity
= 8*8*8,
2628 clust_num_ores
= 22,
2634 -- Small gravel blobs
2635 minetest
.register_ore({
2637 ore
= "rp_default:gravel",
2638 wherein
= "rp_default:stone",
2639 clust_scarcity
= 10*10*10,
2640 clust_num_ores
= 33,
2647 spread
= {x
=150, y
=150, z
=150},
2657 minetest
.register_ore({
2659 ore
= "rp_default:sand",
2660 wherein
= "rp_default:stone",
2661 clust_scarcity
= 10*10*10,
2662 clust_num_ores
= 40,
2669 spread
= {x
=150, y
=150, z
=150},
2679 -- Dirt, Dry Dirt and Swamp Dirt blobs.
2680 -- These get generated depending on the biome.
2681 -- The following code is to generate the list
2682 -- of biomes that include either dirt, dry dirt or swamp dirt.
2684 -- Returns a list of biomes that use the specified nodename
2685 -- as its dirt blob, by using the data from
2686 -- default.get_biome_info.
2687 -- * nodename: A name of the node (a dirt node)
2688 local get_dirt_biomes
= function(nodename
)
2689 local biomes
= default
.get_core_biomes()
2690 local out_biomes
= {}
2692 local biome_info
= default
.get_biome_info(biomes
[b
])
2693 -- Add biome to list iff it uses the specified node as dirt blob
2694 if biome_info
.dirt_blob
~= nil and biome_info
.dirt_blob
== nodename
then
2695 table.insert(out_biomes
, biomes
[b
])
2701 local dirt_biomes
= get_dirt_biomes("rp_default:dirt")
2702 local dry_dirt_biomes
= get_dirt_biomes("rp_default:dry_dirt")
2703 local swamp_dirt_biomes
= get_dirt_biomes("rp_default:swamp_dirt")
2705 minetest
.log("verbose", "[rp_default] List of builtin biomes with Dirt blobs: "..dump(dirt_biomes
))
2706 minetest
.log("verbose", "[rp_default] List of builtin biomes with Dry Dirt blobs: "..dump(dry_dirt_biomes
))
2707 minetest
.log("verbose", "[rp_default] List of builtin biomes with Swamp Dirt blobs: "..dump(swamp_dirt_biomes
))
2709 local np_dirtlike
= {
2712 spread
= {x
=150, y
=150, z
=150},
2720 minetest
.register_ore({
2722 ore
= "rp_default:dirt",
2723 wherein
= "rp_default:stone",
2724 clust_scarcity
= 10*10*10,
2725 clust_num_ores
= 33,
2729 biomes
= dirt_biomes
,
2730 noise_params
= np_dirtlike
,
2733 minetest
.register_ore({
2735 ore
= "rp_default:dry_dirt",
2736 wherein
= "rp_default:stone",
2737 clust_scarcity
= 10*10*10,
2738 clust_num_ores
= 33,
2742 biomes
= dry_dirt_biomes
,
2743 noise_params
= np_dirtlike
,
2746 minetest
.register_ore({
2748 ore
= "rp_default:swamp_dirt",
2749 wherein
= "rp_default:stone",
2750 clust_scarcity
= 10*10*10,
2751 clust_num_ores
= 33,
2755 biomes
= swamp_dirt_biomes
,
2756 noise_params
= np_dirtlike
,