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",
1046 minetest
.register_decoration(
1048 deco_type
= "schematic",
1049 place_on
= {"rp_default:dirt_with_grass"},
1051 fill_ratio
= 0.0001,
1052 biomes
= {"Tall Birch Forest"},
1053 flags
= "place_center_x, place_center_z",
1054 schematic
= minetest
.get_modpath("rp_default")
1055 .. "/schematics/rp_default_layer_birch_2.mts",
1059 minetest
.register_decoration(
1061 deco_type
= "schematic",
1062 place_on
= {"rp_default:dirt_with_grass"},
1064 fill_ratio
= 0.00075,
1065 biomes
= {"Tall Birch Forest"},
1066 flags
= "place_center_x, place_center_z",
1067 schematic
= minetest
.get_modpath("rp_default")
1068 .. "/schematics/rp_default_birch_candlestick.mts",
1074 minetest
.register_decoration(
1076 deco_type
= "schematic",
1077 place_on
= {"rp_default:dirt_with_grass"},
1080 biomes
= {"Forest"},
1081 flags
= "place_center_x, place_center_z",
1082 schematic
= minetest
.get_modpath("rp_default")
1083 .. "/schematics/rp_default_birch_cuboid_3x3_short.mts",
1088 minetest
.register_decoration(
1090 deco_type
= "schematic",
1091 place_on
= {"rp_default:dirt_with_grass"},
1093 fill_ratio
= 0.0003,
1094 biomes
= {"Birch Forest"},
1095 flags
= "place_center_x, place_center_z",
1096 schematic
= minetest
.get_modpath("rp_default")
1097 .. "/schematics/rp_default_birch_cuboid_5x4.mts",
1101 minetest
.register_decoration(
1103 deco_type
= "schematic",
1104 place_on
= {"rp_default:dirt_with_grass"},
1107 biomes
= {"Birch Forest"},
1108 flags
= "place_center_x, place_center_z",
1109 schematic
= minetest
.get_modpath("rp_default")
1110 .. "/schematics/rp_default_birch_cuboid_3x4.mts",
1114 minetest
.register_decoration(
1116 deco_type
= "schematic",
1117 place_on
= {"rp_default:dirt_with_grass"},
1120 biomes
= {"Birch Forest"},
1121 flags
= "place_center_x, place_center_z",
1122 schematic
= minetest
.get_modpath("rp_default")
1123 .. "/schematics/rp_default_birch_cuboid_3x3_long.mts",
1127 minetest
.register_decoration(
1129 deco_type
= "schematic",
1130 place_on
= {"rp_default:dirt_with_grass"},
1133 biomes
= {"Birch Forest"},
1134 flags
= "place_center_x, place_center_z",
1135 schematic
= minetest
.get_modpath("rp_default")
1136 .. "/schematics/rp_default_birch_cuboid_3x3_short.mts",
1140 minetest
.register_decoration(
1142 deco_type
= "schematic",
1143 place_on
= {"rp_default:dirt_with_grass"},
1145 fill_ratio
= 0.0001,
1146 biomes
= {"Birch Forest"},
1147 flags
= "place_center_x, place_center_z",
1148 schematic
= minetest
.get_modpath("rp_default")
1149 .. "/schematics/rp_default_birch_plus.mts",
1153 minetest
.register_decoration(
1155 deco_type
= "schematic",
1156 place_on
= {"rp_default:dirt_with_grass"},
1158 fill_ratio
= 0.0002,
1159 biomes
= {"Birch Forest"},
1160 flags
= "place_center_x, place_center_z",
1161 schematic
= minetest
.get_modpath("rp_default")
1162 .. "/schematics/rp_default_apple_tree_empty.mts",
1169 minetest
.register_decoration(
1171 deco_type
= "schematic",
1172 place_on
= {"rp_default:dirt_with_grass"},
1175 biomes
= {"Dry Swamp"},
1176 flags
= "place_center_x, place_center_z",
1177 schematic
= minetest
.get_modpath("rp_default")
1178 .. "/schematics/rp_default_birch_cuboid_3x3_short.mts",
1183 minetest
.register_decoration(
1185 deco_type
= "schematic",
1186 place_on
= {"rp_default:dirt_with_grass"},
1188 fill_ratio
= 0.00035,
1189 biomes
= {"Orchard"},
1190 flags
= "place_center_x, place_center_z",
1191 schematic
= minetest
.get_modpath("rp_default")
1192 .. "/schematics/rp_default_apple_tree_big.mts",
1197 minetest
.register_decoration(
1199 deco_type
= "schematic",
1200 place_on
= {"rp_default:dirt_with_grass"},
1203 biomes
= {"Orchard"},
1204 flags
= "place_center_x, place_center_z",
1205 schematic
= minetest
.get_modpath("rp_default")
1206 .. "/schematics/rp_default_apple_tree.mts",
1211 minetest
.register_decoration(
1213 deco_type
= "schematic",
1214 place_on
= {"rp_default:dirt_with_grass"},
1216 fill_ratio
= 0.000033,
1217 biomes
= {"Thorny Shrubs"},
1218 flags
= "place_center_x, place_center_z",
1219 schematic
= minetest
.get_modpath("rp_default")
1220 .. "/schematics/rp_default_apple_tree.mts",
1224 minetest
.register_decoration(
1226 deco_type
= "schematic",
1227 place_on
= {"rp_default:dirt_with_grass"},
1229 fill_ratio
= 0.00067,
1230 biomes
= {"Thorny Shrubs"},
1231 flags
= "place_center_x, place_center_z",
1232 schematic
= minetest
.get_modpath("rp_default")
1233 .. "/schematics/rp_default_apple_tree_empty.mts",
1239 minetest
.register_decoration(
1241 deco_type
= "schematic",
1242 place_on
= {"rp_default:dirt_with_grass"},
1245 biomes
= {"Forest", "Deep Forest"},
1246 flags
= "place_center_x, place_center_z",
1247 schematic
= minetest
.get_modpath("rp_default")
1248 .. "/schematics/rp_default_apple_tree.mts",
1253 minetest
.register_decoration(
1255 deco_type
= "schematic",
1256 place_on
= {"rp_default:dirt_with_grass"},
1258 fill_ratio
= 0.0009,
1259 biomes
= {"Oak Forest"},
1260 flags
= "place_center_x, place_center_z",
1261 schematic
= minetest
.get_modpath("rp_default")
1262 .. "/schematics/rp_default_oak_tree_big_1.mts",
1267 minetest
.register_decoration(
1269 deco_type
= "schematic",
1270 place_on
= {"rp_default:dirt_with_grass"},
1272 fill_ratio
= 0.0045,
1273 biomes
= {"Tall Oak Forest"},
1274 flags
= "place_center_x, place_center_z",
1275 schematic
= minetest
.get_modpath("rp_default")
1276 .. "/schematics/rp_default_oak_tree_big_1.mts",
1280 minetest
.register_decoration(
1282 deco_type
= "schematic",
1283 place_on
= {"rp_default:dirt_with_grass"},
1285 fill_ratio
= 0.0045,
1286 biomes
= {"Tall Oak Forest"},
1287 flags
= "place_center_x, place_center_z",
1288 schematic
= minetest
.get_modpath("rp_default")
1289 .. "/schematics/rp_default_oak_tree_big_2.mts",
1295 minetest
.register_decoration(
1297 deco_type
= "schematic",
1298 place_on
= {"rp_default:dirt_with_grass"},
1301 biomes
= {"Dense Oak Forest"},
1302 flags
= "place_center_x, place_center_z",
1303 schematic
= minetest
.get_modpath("rp_default")
1304 .. "/schematics/rp_default_oak_tree_big_1.mts",
1308 minetest
.register_decoration(
1310 deco_type
= "schematic",
1311 place_on
= {"rp_default:dirt_with_grass"},
1314 biomes
= {"Dense Oak Forest"},
1315 flags
= "place_center_x, place_center_z",
1316 schematic
= minetest
.get_modpath("rp_default")
1317 .. "/schematics/rp_default_oak_tree_big_2.mts",
1324 minetest
.register_decoration(
1326 deco_type
= "schematic",
1327 place_on
= {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
1329 fill_ratio
= 0.0008,
1330 biomes
= {"Mixed Swamp", "Mixed Swamp Beach"},
1331 flags
= "place_center_x, place_center_z",
1332 schematic
= minetest
.get_modpath("rp_default")
1333 .. "/schematics/rp_default_swamp_oak.mts",
1338 minetest
.register_decoration(
1340 deco_type
= "schematic",
1341 place_on
= {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt"},
1344 biomes
= {"Swamp Forest", "Swamp Forest Beach"},
1345 flags
= "place_center_x, place_center_z",
1346 schematic
= minetest
.get_modpath("rp_default")
1347 .. "/schematics/rp_default_swamp_oak.mts",
1352 minetest
.register_decoration(
1354 deco_type
= "schematic",
1355 place_on
= {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt", "rp_default:dirt"},
1357 fill_ratio
= 0.0001,
1358 biomes
= {"Swamp Forest", "Swamp Forest Beach"},
1359 flags
= "place_center_x, place_center_z",
1360 schematic
= minetest
.get_modpath("rp_default")
1361 .. "/schematics/rp_default_swamp_birch.mts",
1365 minetest
.register_decoration(
1367 deco_type
= "schematic",
1368 place_on
= {"rp_default:dirt_with_swamp_grass", "rp_default:swamp_dirt", "rp_default:dirt"},
1371 biomes
= {"Dry Swamp", "Dry Swamp Beach"},
1372 flags
= "place_center_x, place_center_z",
1373 schematic
= minetest
.get_modpath("rp_default")
1374 .. "/schematics/rp_default_swamp_birch.mts",
1381 local MYSTERY_FOREST_SPREAD
= { x
=500, y
=500, z
=500 }
1382 local MYSTERY_FOREST_OFFSET
= 0.001
1383 local MYSTERY_FOREST_OFFSET_STAIRCASE
= -0.001
1384 local MYSTERY_FOREST_OFFSET_APPLES
= -0.0005
1385 local MYSTERY_FOREST_SCALE
= 0.008
1387 minetest
.register_decoration(
1389 deco_type
= "schematic",
1390 place_on
= {"rp_default:dirt_with_grass"},
1392 biomes
= {"Mystery Forest"},
1393 flags
= "place_center_x, place_center_z",
1394 schematic
= minetest
.get_modpath("rp_default")
1395 .. "/schematics/rp_default_staircase_tree.mts",
1400 scale
= -MYSTERY_FOREST_SCALE
,
1401 offset
= MYSTERY_FOREST_OFFSET_STAIRCASE
,
1402 spread
= MYSTERY_FOREST_SPREAD
,
1409 minetest
.register_decoration(
1411 deco_type
= "schematic",
1412 place_on
= {"rp_default:dirt_with_grass"},
1414 biomes
= {"Mystery Forest"},
1415 flags
= "place_center_x, place_center_z",
1416 schematic
= minetest
.get_modpath("rp_default")
1417 .. "/schematics/rp_default_layer_birch.mts",
1422 scale
= MYSTERY_FOREST_SCALE
,
1423 offset
= MYSTERY_FOREST_OFFSET
,
1424 spread
= MYSTERY_FOREST_SPREAD
,
1431 minetest
.register_decoration(
1433 deco_type
= "schematic",
1434 place_on
= {"rp_default:dirt_with_grass"},
1436 biomes
= {"Mystery Forest"},
1437 flags
= "place_center_x, place_center_z",
1438 schematic
= minetest
.get_modpath("rp_default")
1439 .. "/schematics/rp_default_telephone_tree.mts",
1444 scale
= -MYSTERY_FOREST_SCALE
,
1445 offset
= MYSTERY_FOREST_OFFSET
,
1446 spread
= MYSTERY_FOREST_SPREAD
,
1453 minetest
.register_decoration(
1455 deco_type
= "schematic",
1456 place_on
= {"rp_default:dirt_with_grass"},
1458 biomes
= {"Mystery Forest"},
1459 flags
= "place_center_x, place_center_z",
1460 schematic
= minetest
.get_modpath("rp_default")
1461 .. "/schematics/rp_default_telephone_tree_apples.mts",
1466 scale
= -MYSTERY_FOREST_SCALE
,
1467 offset
= MYSTERY_FOREST_OFFSET_APPLES
,
1468 spread
= MYSTERY_FOREST_SPREAD
,
1478 minetest
.register_decoration(
1480 deco_type
= "schematic",
1481 place_on
= {"rp_default:dirt_with_grass"},
1483 biomes
= {"Mystery Forest"},
1484 flags
= "place_center_x, place_center_z",
1485 schematic
= minetest
.get_modpath("rp_default")
1486 .. "/schematics/rp_default_cross_birch.mts",
1491 scale
= MYSTERY_FOREST_SCALE
,
1492 offset
= MYSTERY_FOREST_OFFSET
,
1493 spread
= MYSTERY_FOREST_SPREAD
,
1500 minetest
.register_decoration(
1502 deco_type
= "schematic",
1503 place_on
= {"rp_default:dirt_with_grass"},
1505 biomes
= {"Poplar Plains"},
1506 flags
= "place_center_x, place_center_z",
1507 schematic
= minetest
.get_modpath("rp_default")
1508 .. "/schematics/rp_default_poplar_large.mts",
1515 spread
= {x
=50,y
=50,z
=50},
1521 minetest
.register_decoration(
1523 deco_type
= "schematic",
1524 place_on
= {"rp_default:dirt_with_grass"},
1526 biomes
= {"Poplar Plains"},
1527 flags
= "place_center_x, place_center_z",
1528 schematic
= minetest
.get_modpath("rp_default")
1529 .. "/schematics/rp_default_poplar_small.mts",
1536 spread
= {x
=50,y
=50,z
=50},
1542 minetest
.register_decoration(
1544 deco_type
= "schematic",
1545 place_on
= {"rp_default:dirt_with_grass"},
1546 fill_ratio
= 0.0002,
1548 biomes
= {"Poplar Plains"},
1549 flags
= "place_center_x, place_center_z",
1550 schematic
= minetest
.get_modpath("rp_default")
1551 .. "/schematics/rp_default_poplar_small.mts",
1556 -- Small poplar tree blobs
1557 minetest
.register_decoration(
1559 deco_type
= "schematic",
1560 place_on
= {"rp_default:dirt_with_grass"},
1562 biomes
= {"Baby Poplar Plains"},
1563 flags
= "place_center_x, place_center_z",
1564 schematic
= minetest
.get_modpath("rp_default")
1565 .. "/schematics/rp_default_poplar_small.mts",
1572 spread
= {x
=24,y
=24,z
=24},
1579 -- Occasional lonely poplars
1580 minetest
.register_decoration(
1582 deco_type
= "schematic",
1583 place_on
= {"rp_default:dirt_with_grass"},
1585 fill_ratio
= 0.0002,
1586 biomes
= {"Baby Poplar Plains"},
1587 flags
= "place_center_x, place_center_z",
1588 schematic
= minetest
.get_modpath("rp_default")
1589 .. "/schematics/rp_default_poplar_small.mts",
1596 minetest
.register_decoration(
1598 deco_type
= "schematic",
1599 place_on
= {"rp_default:dirt_with_grass"},
1601 fill_ratio
= 0.00625,
1602 biomes
= {"Tall Birch Forest"},
1603 flags
= "place_center_x, place_center_z",
1604 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_birch_bush_big.mts",
1610 minetest
.register_decoration(
1612 deco_type
= "schematic",
1613 place_on
= {"rp_default:dirt_with_grass"},
1616 biomes
= {"Birch Forest"},
1617 flags
= "place_center_x, place_center_z",
1618 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_birch_bush.mts",
1623 minetest
.register_decoration(
1625 deco_type
= "schematic",
1626 place_on
= {"rp_default:dirt_with_grass"},
1628 fill_ratio
= 0.0001,
1629 biomes
= {"Tall Birch Forest"},
1630 flags
= "place_center_x, place_center_z",
1631 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_birch_bush.mts",
1637 minetest
.register_decoration(
1639 deco_type
= "schematic",
1640 place_on
= {"rp_default:dirt_with_grass"},
1642 biomes
= {"Baby Poplar Plains"},
1643 flags
= "place_center_x, place_center_z",
1644 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
1651 offset
= -0.0000001,
1652 spread
= { x
= 50, y
= 50, z
= 50 },
1659 minetest
.register_decoration(
1661 deco_type
= "schematic",
1662 place_on
= {"rp_default:dirt_with_grass"},
1664 biomes
= {"Thorny Shrubs"},
1665 flags
= "place_center_x, place_center_z",
1666 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
1674 spread
= { x
= 82, y
= 82, z
= 82 },
1681 minetest
.register_decoration(
1683 deco_type
= "schematic",
1684 place_on
= {"rp_default:dirt_with_grass"},
1687 biomes
= {"Shrubbery"},
1688 flags
= "place_center_x, place_center_z",
1689 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
1695 -- Wilderness apple trees: 50/50 split between
1696 -- trees with apples and those without.
1697 minetest
.register_decoration(
1699 deco_type
= "schematic",
1700 place_on
= {"rp_default:dirt_with_grass"},
1703 biomes
= {"Wilderness"},
1704 flags
= "place_center_x, place_center_z",
1705 schematic
= minetest
.get_modpath("rp_default")
1706 .. "/schematics/rp_default_apple_tree.mts",
1710 minetest
.register_decoration(
1712 deco_type
= "schematic",
1713 place_on
= {"rp_default:dirt_with_grass"},
1716 biomes
= {"Wilderness"},
1717 flags
= "place_center_x, place_center_z",
1718 schematic
= minetest
.get_modpath("rp_default")
1719 .. "/schematics/rp_default_apple_tree_empty.mts",
1724 minetest
.register_decoration(
1726 deco_type
= "schematic",
1727 place_on
= {"rp_default:dirt_with_grass", "rp_default:dirt"},
1729 fill_ratio
= 0.0001,
1730 biomes
= {"Dry Swamp"},
1731 flags
= "place_center_x, place_center_z",
1732 schematic
= minetest
.get_modpath("rp_default")
1733 .. "/schematics/rp_default_apple_tree.mts",
1738 minetest
.register_decoration(
1740 deco_type
= "schematic",
1741 place_on
= {"rp_default:dirt_with_grass"},
1744 biomes
= {"Wilderness"},
1745 flags
= "place_center_x, place_center_z",
1746 schematic
= minetest
.get_modpath("rp_default")
1747 .. "/schematics/rp_default_oak_tree.mts",
1753 minetest
.register_decoration(
1755 deco_type
= "schematic",
1756 place_on
= {"rp_default:dirt_with_grass"},
1759 biomes
= {"Oak Shrubbery"},
1760 flags
= "place_center_x, place_center_z",
1761 schematic
= minetest
.get_modpath("rp_default")
1762 .. "/schematics/rp_default_oak_tree.mts",
1767 minetest
.register_decoration(
1769 deco_type
= "schematic",
1770 place_on
= {"rp_default:dirt_with_grass"},
1773 biomes
= {"Dense Oak Forest"},
1774 flags
= "place_center_x, place_center_z",
1775 schematic
= minetest
.get_modpath("rp_default")
1776 .. "/schematics/rp_default_oak_tree.mts",
1781 minetest
.register_decoration(
1783 deco_type
= "schematic",
1784 place_on
= {"rp_default:dirt_with_grass"},
1786 fill_ratio
= 0.0225,
1787 biomes
= {"Oak Forest"},
1788 flags
= "place_center_x, place_center_z",
1789 schematic
= minetest
.get_modpath("rp_default")
1790 .. "/schematics/rp_default_oak_tree.mts",
1795 minetest
.register_decoration(
1797 deco_type
= "schematic",
1798 place_on
= {"rp_default:dirt_with_grass"},
1800 fill_ratio
= 0.0015,
1801 biomes
= {"Tall Oak Forest"},
1802 flags
= "place_center_x, place_center_z",
1803 schematic
= minetest
.get_modpath("rp_default")
1804 .. "/schematics/rp_default_oak_tree.mts",
1813 -- Cactus decorations
1815 minetest
.register_decoration(
1817 deco_type
= "schematic",
1818 place_on
= {"rp_default:sand"},
1821 biomes
= {"Desert"},
1822 flags
= "place_center_x, place_center_z",
1823 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_cactus.mts",
1826 rotation
= "random",
1831 if mg_name
~= "v6" then
1832 minetest
.register_decoration(
1834 deco_type
= "schematic",
1835 place_on
= {"rp_default:dry_dirt"},
1838 biomes
= {"Wasteland"},
1839 flags
= "place_center_x, place_center_z",
1840 schematic
= minetest
.get_modpath("rp_default")
1841 .. "/schematics/rp_default_small_rock.mts",
1844 rotation
= "random",
1847 minetest
.register_decoration(
1849 deco_type
= "schematic",
1850 place_on
= {"rp_default:dry_dirt"},
1853 biomes
= {"Wasteland"},
1854 flags
= "place_center_x, place_center_z",
1855 schematic
= minetest
.get_modpath("rp_default")
1856 .. "/schematics/rp_default_large_rock.mts",
1859 rotation
= "random",
1862 minetest
.register_decoration(
1864 deco_type
= "schematic",
1865 place_on
= {"rp_default:stone", "rp_default:dry_dirt"},
1868 biomes
= {"Rocky Dryland"},
1869 flags
= "place_center_x, place_center_z",
1870 schematic
= minetest
.get_modpath("rp_default")
1871 .. "/schematics/rp_default_small_rock.mts",
1874 rotation
= "random",
1877 minetest
.register_decoration(
1879 deco_type
= "schematic",
1880 place_on
= {"rp_default:dry_dirt", "rp_default:dirt_with_dry_grass"},
1883 biomes
= {"Savannic Wasteland"},
1884 flags
= "place_center_x, place_center_z",
1885 schematic
= minetest
.get_modpath("rp_default")
1886 .. "/schematics/rp_default_small_rock.mts",
1889 rotation
= "random",
1893 -- Sulfur decorations
1895 minetest
.register_decoration(
1897 deco_type
= "simple",
1898 place_on
= "rp_default:dry_dirt",
1901 biomes
= {"Wasteland"},
1902 decoration
= {"rp_default:stone_with_sulfur"},
1906 minetest
.register_decoration(
1908 deco_type
= "simple",
1909 place_on
= {"rp_default:dry_dirt", "rp_default:stone"},
1911 fill_ratio
= 0.0001,
1912 biomes
= {"Rocky Dryland"},
1913 decoration
= {"rp_default:stone_with_sulfur"},
1918 -- Tiny tree decorations
1920 minetest
.register_decoration(
1922 deco_type
= "schematic",
1923 place_on
= {"rp_default:dry_dirt"},
1925 fill_ratio
= 0.0001,
1926 biomes
= {"Rocky Dryland"},
1927 flags
= "place_center_x, place_center_z",
1928 schematic
= minetest
.get_modpath("rp_default")
1929 .. "/schematics/rp_default_tiny_birch.mts",
1934 minetest
.register_decoration(
1936 deco_type
= "schematic",
1937 place_on
= {"rp_default:dry_dirt"},
1939 fill_ratio
= 0.00025,
1940 biomes
= {"Rocky Dryland"},
1941 flags
= "place_center_x, place_center_z",
1942 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_3layer.mts",
1946 minetest
.register_decoration(
1948 deco_type
= "schematic",
1949 place_on
= {"rp_default:dry_dirt"},
1951 fill_ratio
= 0.00025,
1952 biomes
= {"Rocky Dryland"},
1953 flags
= "place_center_x, place_center_z",
1954 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_2layer.mts",
1958 minetest
.register_decoration(
1960 deco_type
= "schematic",
1961 place_on
= {"rp_default:dry_dirt"},
1964 biomes
= {"Rocky Dryland"},
1965 flags
= "place_center_x, place_center_z",
1966 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
1970 minetest
.register_decoration(
1972 deco_type
= "schematic",
1973 place_on
= {"rp_default:dry_dirt"},
1975 fill_ratio
= 0.0001,
1976 biomes
= {"Rocky Dryland"},
1977 flags
= "place_center_x, place_center_z",
1978 schematic
= minetest
.get_modpath("rp_default")
1979 .. "/schematics/rp_default_tiny_birch.mts",
1984 minetest
.register_decoration(
1986 deco_type
= "schematic",
1987 place_on
= {"rp_default:dry_dirt"},
1989 fill_ratio
= 0.00025,
1990 biomes
= {"Rocky Dryland"},
1991 flags
= "place_center_x, place_center_z",
1992 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_3layer.mts",
1996 minetest
.register_decoration(
1998 deco_type
= "schematic",
1999 place_on
= {"rp_default:dry_dirt"},
2001 fill_ratio
= 0.00025,
2002 biomes
= {"Rocky Dryland"},
2003 flags
= "place_center_x, place_center_z",
2004 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_tree_2layer.mts",
2008 minetest
.register_decoration(
2010 deco_type
= "schematic",
2011 place_on
= {"rp_default:dry_dirt"},
2014 biomes
= {"Rocky Dryland"},
2015 flags
= "place_center_x, place_center_z",
2016 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
2021 minetest
.register_decoration(
2023 deco_type
= "schematic",
2024 place_on
= {"rp_default:dry_dirt"},
2027 biomes
= {"Wooded Dryland"},
2028 flags
= "place_center_x, place_center_z",
2029 schematic
= minetest
.get_modpath("rp_default")
2030 .. "/schematics/rp_default_tiny_oak.mts",
2035 minetest
.register_decoration(
2037 deco_type
= "schematic",
2038 place_on
= {"rp_default:dry_dirt"},
2041 biomes
= {"Wooded Dryland"},
2042 flags
= "place_center_x, place_center_z",
2043 schematic
= minetest
.get_modpath("rp_default")
2044 .. "/schematics/rp_default_tiny_birch.mts",
2050 minetest
.register_decoration(
2052 deco_type
= "schematic",
2053 place_on
= {"rp_default:dry_dirt"},
2055 fill_ratio
= 0.0002,
2056 biomes
= {"Savannic Wasteland"},
2057 flags
= "place_center_x, place_center_z",
2058 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_tiny_dry_tree.mts",
2065 -- Bush/shrub decorations
2067 minetest
.register_decoration(
2069 deco_type
= "schematic",
2070 place_on
= {"rp_default:dirt_with_grass"},
2072 fill_ratio
= 0.0075,
2073 biomes
= {"Oak Shrubbery"},
2074 flags
= "place_center_x, place_center_z",
2075 schematic
= minetest
.get_modpath("rp_default")
2076 .. "/schematics/rp_default_oak_bush_wide.mts",
2081 minetest
.register_decoration(
2083 deco_type
= "schematic",
2084 place_on
= {"rp_default:dirt_with_grass"},
2087 biomes
= {"Dense Oak Forest"},
2088 flags
= "place_center_x, place_center_z",
2089 schematic
= minetest
.get_modpath("rp_default")
2090 .. "/schematics/rp_default_oak_bush_wide.mts",
2095 minetest
.register_decoration(
2097 deco_type
= "schematic",
2098 place_on
= {"rp_default:dirt_with_grass"},
2101 biomes
= {"Oak Forest"},
2102 flags
= "place_center_x, place_center_z",
2103 schematic
= minetest
.get_modpath("rp_default")
2104 .. "/schematics/rp_default_oak_bush_wide.mts",
2109 minetest
.register_decoration(
2111 deco_type
= "schematic",
2112 place_on
= {"rp_default:dirt_with_dry_grass"},
2115 biomes
= {"Savanna", "Chaparral"},
2116 flags
= "place_center_x, place_center_z",
2117 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush_small.mts",
2123 minetest
.register_decoration(
2125 deco_type
= "schematic",
2126 place_on
= {"rp_default:dirt_with_dry_grass"},
2128 fill_ratio
= 0.0025,
2129 biomes
= {"Savannic Wasteland"},
2130 flags
= "place_center_x, place_center_z",
2131 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush_small.mts",
2137 minetest
.register_decoration(
2139 deco_type
= "schematic",
2140 place_on
= {"rp_default:dry_dirt"},
2143 biomes
= {"Rocky Dryland", "Wooded Dryland"},
2144 flags
= "place_center_x, place_center_z",
2145 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush_small.mts",
2150 minetest
.register_decoration(
2152 deco_type
= "schematic",
2153 place_on
= {"rp_default:dirt_with_dry_grass"},
2156 biomes
= {"Chaparral"},
2157 flags
= "place_center_x, place_center_z",
2158 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush.mts",
2163 minetest
.register_decoration(
2165 deco_type
= "schematic",
2166 place_on
= {"rp_default:dirt_with_grass"},
2168 biomes
= {"Thorny Shrubs"},
2169 flags
= "place_center_x, place_center_z",
2170 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush.mts",
2178 spread
= { x
= 82, y
= 82, z
= 82 },
2186 minetest
.register_decoration(
2188 deco_type
= "schematic",
2189 place_on
= {"rp_default:dirt_with_grass"},
2191 fill_ratio
= 0.0003,
2192 biomes
= {"Oak Shrubbery"},
2193 flags
= "place_center_x, place_center_z",
2194 schematic
= minetest
.get_modpath("rp_default")
2195 .. "/schematics/rp_default_normal_bush_small.mts",
2200 minetest
.register_decoration(
2202 deco_type
= "schematic",
2203 place_on
= {"rp_default:dirt_with_grass"},
2206 biomes
= {"Shrubbery"},
2207 flags
= "place_center_x, place_center_z",
2208 schematic
= minetest
.get_modpath("rp_default")
2209 .. "/schematics/rp_default_normal_bush_small.mts",
2216 minetest
.register_decoration(
2218 deco_type
= "schematic",
2219 place_on
= {"rp_default:dirt_with_grass"},
2223 flags
= "place_center_x, place_center_z",
2224 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
2229 minetest
.register_decoration(
2231 deco_type
= "schematic",
2232 place_on
= {"rp_default:dirt_with_grass"},
2234 fill_ratio
= 0.0004,
2235 biomes
= {"Wilderness"},
2236 flags
= "place_center_x, place_center_z",
2237 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_dry_bush.mts",
2242 minetest
.register_decoration(
2244 deco_type
= "schematic",
2245 place_on
= {"rp_default:dirt_with_grass"},
2247 fill_ratio
= 0.0036,
2248 biomes
= {"Wilderness"},
2249 flags
= "place_center_x, place_center_z",
2250 schematic
= minetest
.get_modpath("rp_default") .. "/schematics/rp_default_bush.mts",
2258 -- Thistle decorations
2260 minetest
.register_decoration(
2262 deco_type
= "simple",
2263 place_on
= "rp_default:dirt_with_grass",
2266 biomes
= {"Wilderness"},
2267 decoration
= {"rp_default:thistle"},
2272 minetest
.register_decoration(
2274 deco_type
= "simple",
2275 place_on
= {"rp_default:dirt_with_grass", "rp_default:dry_dirt"},
2277 biomes
= {"Thorny Shrubs"},
2278 decoration
= {"rp_default:thistle"},
2286 spread
= { x
= 12, y
= 12, z
= 12 },
2293 -- Papyrus decorations
2296 minetest
.register_decoration(
2298 deco_type
= "simple",
2299 place_on
= {"rp_default:sand", "rp_default:dirt", "rp_default:dirt_with_grass"},
2300 spawn_by
= {"rp_default:water_source", "rp_default:water_flowing"},
2304 biomes
= {"Grassland Ocean", "Grassland", "Forest Ocean", "Forest", "Wilderness Ocean", "Wilderness", "Birch Forest Ocean", "Tall Birch Forest Ocean", "Marsh Beach"},
2305 decoration
= {"rp_default:papyrus"},
2311 -- Grassland papyrus
2312 minetest
.register_decoration(
2314 deco_type
= "simple",
2315 place_on
= {"rp_default:dirt_with_grass"},
2316 spawn_by
= {"group:water"},
2320 biomes
= {"Grassland", "Marsh", "Forest", "Deep Forest", "Wilderness", "Baby Poplar Plains"},
2321 decoration
= {"rp_default:papyrus"},
2330 minetest
.register_decoration(
2332 deco_type
= "simple",
2333 place_on
= {"rp_default:swamp_dirt", "rp_default:dirt_with_swamp_grass"},
2334 spawn_by
= {"group:water"},
2338 biomes
= {"Mixed Swamp"},
2339 decoration
= {"rp_default:papyrus"},
2346 minetest
.register_decoration(
2348 deco_type
= "simple",
2349 place_on
= {"rp_default:swamp_dirt", "rp_default:dirt_with_swamp_grass"},
2350 spawn_by
= {"group:water"},
2354 biomes
= {"Papyrus Swamp"},
2355 decoration
= {"rp_default:papyrus"},
2362 -- Flower decorations
2364 minetest
.register_decoration(
2366 deco_type
= "simple",
2367 place_on
= "rp_default:dirt_with_grass",
2370 biomes
= {"Grassland", "Wilderness", "Orchard", "Baby Poplar Plains", "Birch Forest"},
2371 decoration
= {"rp_default:flower"},
2376 -- Grass decorations
2378 if mg_name
~= "v6" then
2379 minetest
.register_decoration(
2381 deco_type
= "simple",
2382 place_on
= "rp_default:dirt_with_grass",
2385 biomes
= {"Grassland", "Orchard", "Swamp Meadow", "Baby Poplar Plains", "Poplar Plains", "Shrubbery", "Oak Shrubbery", "Thorny Shrubs", "Dry Swamp"},
2386 decoration
= {"rp_default:grass"},
2392 minetest
.register_decoration(
2394 deco_type
= "simple",
2395 place_on
= "rp_default:dirt_with_swamp_grass",
2398 biomes
= {"Mixed Swamp", "Dry Swamp", "Swamp Papyrus", "Swamp Forest"},
2399 decoration
= {"rp_default:swamp_grass"},
2403 minetest
.register_decoration(
2405 deco_type
= "simple",
2406 place_on
= "rp_default:dirt_with_swamp_grass",
2409 biomes
= {"Swamp Meadow"},
2410 decoration
= {"rp_default:swamp_grass"},
2415 minetest
.register_decoration(
2417 deco_type
= "simple",
2418 place_on
= "rp_default:dirt_with_dry_grass",
2421 biomes
= {"Desert", "Savanna", "Chaparral", "Savannic Wasteland"},
2422 decoration
= {"rp_default:dry_grass"},
2427 if mg_name
~= "v6" then
2428 minetest
.register_decoration(
2430 deco_type
= "simple",
2431 place_on
= "rp_default:dirt_with_grass",
2434 biomes
= {"Forest", "Deep Forest", "Birch Forest", "Tall Birch Forest", "Oak Forest", "Dense Oak Forest", "Tall Oak Forest", "Mystery Forest"},
2435 decoration
= {"rp_default:grass"},
2440 minetest
.register_decoration(
2442 deco_type
= "simple",
2443 place_on
= "rp_default:dirt_with_grass",
2446 biomes
= {"Forest", "Marsh", "Grove", "Shrubbery", "Oak Shrubbery"},
2447 decoration
= {"rp_default:tall_grass"},
2452 minetest
.register_decoration(
2454 deco_type
= "simple",
2455 place_on
= "rp_default:dirt_with_grass",
2458 biomes
= {"Deep Forest", "Tall Oak Forest"},
2459 decoration
= {"rp_default:tall_grass"},
2464 minetest
.register_decoration(
2466 deco_type
= "simple",
2467 place_on
= "rp_default:dirt_with_grass",
2470 biomes
= {"Thorny Shrubs"},
2471 decoration
= {"rp_default:tall_grass"},
2475 minetest
.register_decoration(
2477 deco_type
= "simple",
2478 place_on
= "rp_default:dirt_with_grass",
2481 biomes
= {"Thorny Shrubs"},
2482 decoration
= {"rp_default:grass"},
2489 minetest
.register_decoration(
2491 deco_type
= "simple",
2492 place_on
= "rp_default:dirt_with_grass",
2495 biomes
= {"Wilderness", "Thorny Shrubs"},
2496 decoration
= {"rp_default:grass"},
2501 minetest
.register_decoration(
2503 deco_type
= "simple",
2504 place_on
= "rp_default:dirt_with_grass",
2507 biomes
= {"Wilderness", "Thorny Shrubs"},
2508 decoration
= {"rp_default:tall_grass"},
2515 minetest
.register_decoration(
2517 deco_type
= "simple",
2518 place_on
= "rp_default:dirt_with_grass",
2521 biomes
= {"Wilderness", "Grove", "Tall Oak Forest", "Mystery Forest"},
2522 decoration
= {"rp_default:fern"},
2529 minetest
.register_decoration(
2531 deco_type
= "simple",
2532 place_on
= {"rp_default:sand", "rp_default:gravel"},
2535 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"},
2536 decoration
= {"rp_default:clam"},
2546 minetest
.register_ore( -- Common above sea level mainly
2548 ore_type
= "scatter",
2549 ore
= "rp_default:stone_with_graphite",
2550 wherein
= "rp_default:stone",
2551 clust_scarcity
= 9*9*9,
2558 minetest
.register_ore( -- Slight scattering deeper down
2560 ore_type
= "scatter",
2561 ore
= "rp_default:stone_with_graphite",
2562 wherein
= "rp_default:stone",
2563 clust_scarcity
= 13*13*13,
2572 minetest
.register_ore( -- Even distribution
2574 ore_type
= "scatter",
2575 ore
= "rp_default:stone_with_coal",
2576 wherein
= "rp_default:stone",
2577 clust_scarcity
= 10*10*10,
2584 minetest
.register_ore( -- Dense sheet
2586 ore_type
= "scatter",
2587 ore
= "rp_default:stone_with_coal",
2588 wherein
= "rp_default:stone",
2589 clust_scarcity
= 7*7*7,
2590 clust_num_ores
= 10,
2596 minetest
.register_ore( -- Deep ore sheet
2598 ore_type
= "scatter",
2599 ore
= "rp_default:stone_with_coal",
2600 wherein
= "rp_default:stone",
2601 clust_scarcity
= 6*6*6,
2602 clust_num_ores
= 26,
2610 minetest
.register_ore( -- Even distribution
2612 ore_type
= "scatter",
2613 ore
= "rp_default:stone_with_iron",
2614 wherein
= "rp_default:stone",
2615 clust_scarcity
= 12*12*12,
2622 minetest
.register_ore( -- Dense sheet
2624 ore_type
= "scatter",
2625 ore
= "rp_default:stone_with_iron",
2626 wherein
= "rp_default:stone",
2627 clust_scarcity
= 8*8*8,
2628 clust_num_ores
= 20,
2634 minetest
.register_ore( -- Dense sheet
2636 ore_type
= "scatter",
2637 ore
= "rp_default:stone_with_iron",
2638 wherein
= "rp_default:stone",
2639 clust_scarcity
= 7*7*7,
2640 clust_num_ores
= 17,
2648 minetest
.register_ore( -- Even distribution
2650 ore_type
= "scatter",
2651 ore
= "rp_default:stone_with_tin",
2652 wherein
= "rp_default:stone",
2653 clust_scarcity
= 14*14*14,
2660 minetest
.register_ore( -- Dense sheet
2662 ore_type
= "scatter",
2663 ore
= "rp_default:stone_with_tin",
2664 wherein
= "rp_default:stone",
2665 clust_scarcity
= 7*7*7,
2666 clust_num_ores
= 10,
2674 minetest
.register_ore( -- Begin sheet
2676 ore_type
= "scatter",
2677 ore
= "rp_default:stone_with_copper",
2678 wherein
= "rp_default:stone",
2679 clust_scarcity
= 6*6*6,
2680 clust_num_ores
= 12,
2686 minetest
.register_ore( -- Rare even distribution
2688 ore_type
= "scatter",
2689 ore
= "rp_default:stone_with_copper",
2690 wherein
= "rp_default:stone",
2691 clust_scarcity
= 13*13*13,
2692 clust_num_ores
= 10,
2698 minetest
.register_ore( -- Large clusters
2700 ore_type
= "scatter",
2701 ore
= "rp_default:stone_with_copper",
2702 wherein
= "rp_default:stone",
2703 clust_scarcity
= 8*8*8,
2704 clust_num_ores
= 22,
2710 -- Small gravel blobs
2711 minetest
.register_ore({
2713 ore
= "rp_default:gravel",
2714 wherein
= "rp_default:stone",
2715 clust_scarcity
= 10*10*10,
2716 clust_num_ores
= 33,
2723 spread
= {x
=150, y
=150, z
=150},
2733 minetest
.register_ore({
2735 ore
= "rp_default:sand",
2736 wherein
= "rp_default:stone",
2737 clust_scarcity
= 10*10*10,
2738 clust_num_ores
= 40,
2745 spread
= {x
=150, y
=150, z
=150},
2755 -- Dirt, Dry Dirt and Swamp Dirt blobs.
2756 -- These get generated depending on the biome.
2757 -- The following code is to generate the list
2758 -- of biomes that include either dirt, dry dirt or swamp dirt.
2760 -- Returns a list of biomes that use the specified nodename
2761 -- as its dirt blob, by using the data from
2762 -- default.get_biome_info.
2763 -- * nodename: A name of the node (a dirt node)
2764 local get_dirt_biomes
= function(nodename
)
2765 local biomes
= default
.get_core_biomes()
2766 local out_biomes
= {}
2768 local biome_info
= default
.get_biome_info(biomes
[b
])
2769 -- Add biome to list iff it uses the specified node as dirt blob
2770 if biome_info
.dirt_blob
~= nil and biome_info
.dirt_blob
== nodename
then
2771 table.insert(out_biomes
, biomes
[b
])
2777 local dirt_biomes
= get_dirt_biomes("rp_default:dirt")
2778 local dry_dirt_biomes
= get_dirt_biomes("rp_default:dry_dirt")
2779 local swamp_dirt_biomes
= get_dirt_biomes("rp_default:swamp_dirt")
2781 minetest
.log("verbose", "[rp_default] List of builtin biomes with Dirt blobs: "..dump(dirt_biomes
))
2782 minetest
.log("verbose", "[rp_default] List of builtin biomes with Dry Dirt blobs: "..dump(dry_dirt_biomes
))
2783 minetest
.log("verbose", "[rp_default] List of builtin biomes with Swamp Dirt blobs: "..dump(swamp_dirt_biomes
))
2785 local np_dirtlike
= {
2788 spread
= {x
=150, y
=150, z
=150},
2796 minetest
.register_ore({
2798 ore
= "rp_default:dirt",
2799 wherein
= "rp_default:stone",
2800 clust_scarcity
= 10*10*10,
2801 clust_num_ores
= 33,
2805 biomes
= dirt_biomes
,
2806 noise_params
= np_dirtlike
,
2809 minetest
.register_ore({
2811 ore
= "rp_default:dry_dirt",
2812 wherein
= "rp_default:stone",
2813 clust_scarcity
= 10*10*10,
2814 clust_num_ores
= 33,
2818 biomes
= dry_dirt_biomes
,
2819 noise_params
= np_dirtlike
,
2822 minetest
.register_ore({
2824 ore
= "rp_default:swamp_dirt",
2825 wherein
= "rp_default:stone",
2826 clust_scarcity
= 10*10*10,
2827 clust_num_ores
= 33,
2831 biomes
= swamp_dirt_biomes
,
2832 noise_params
= np_dirtlike
,