@@ -410,6 +410,18 @@ Currently supported flags: absheight
410
410
Also produce this same ore between the height range of -height_max and -height_min.
411
411
Useful for having ore in sky realms without having to duplicate ore entries.
412
412
413
+ Decoration types
414
+ -------------------
415
+ The varying types of decorations that can be placed.
416
+ The default value is simple, and is currently the only type supported.
417
+
418
+ - simple
419
+ Creates a 1xHx1 column of a specified node (or a random node from a list, if a decoration
420
+ list is specified). Can specify a certain node it must spawn next to, such as water or lava,
421
+ for example. Can also generate a decoration of random height between a specified lower and
422
+ upper bound. This type of decoration is intended for placement of grass, flowers, cacti,
423
+ papyrus, and so on.
424
+
413
425
HUD element types
414
426
-------------------
415
427
The position field is used for all element types.
@@ -946,6 +958,7 @@ minetest.register_craftitem(name, item definition)
946
958
minetest.register_alias(name, convert_to)
947
959
minetest.register_craft(recipe)
948
960
minetest.register_ore(ore definition)
961
+ minetest.register_decoration(decoration definition)
949
962
950
963
Global callback registration functions: (Call these only at load time)
951
964
minetest.register_globalstep(func(dtime))
@@ -1835,7 +1848,7 @@ Recipe for register_craft (furnace fuel)
1835
1848
1836
1849
Ore definition (register_ore)
1837
1850
{
1838
- ore_type = "scatter" -- See "Ore types"
1851
+ ore_type = "scatter", -- See "Ore types"
1839
1852
ore = "default:stone_with_coal",
1840
1853
wherein = "default:stone",
1841
1854
clust_scarcity = 8*8*8,
@@ -1857,6 +1870,40 @@ Ore definition (register_ore)
1857
1870
^ Needed for sheet ore_type. Omit from scatter ore_type for a uniform ore distribution
1858
1871
}
1859
1872
1873
+ Decoration definition (register_decoration)
1874
+ {
1875
+ deco_type = "simple", -- See "Decoration types"
1876
+ place_on = "default:dirt_with_grass",
1877
+ ^ Node that decoration can be placed on
1878
+ divlen = 8,
1879
+ ^ Number of divisions made in the chunk being generated
1880
+ fill_ratio = 0.02,
1881
+ ^ Ratio of the area to be uniformly filled by the decoration.
1882
+ ^ Used only if noise_params is not specified.
1883
+ noise_params = {offset=0, scale=.45, spread={x=100, y=100, z=100}, seed=354, octaves=3, persist=0.7},
1884
+ ^ NoiseParams structure describing the perlin noise used for decoration distribution.
1885
+ ^ The result of this is multiplied by the 2d area of the division being decorated.
1886
+ biomes = {"Oceanside", "Hills", "Plains"},
1887
+ ^ List of biomes in which this decoration occurs. Occurs in all biomes if this is omitted,
1888
+ ^ and ignored if the Mapgen being used does not support biomes.
1889
+
1890
+ ----- Simple-type parameters
1891
+ decoration = "default:grass",
1892
+ ^ The node name used as the decoration.
1893
+ ^ If instead a list of strings, a randomly selected node from the list is placed as the decoration.
1894
+ height = 1,
1895
+ ^ Number of nodes high the decoration is made.
1896
+ ^ If height_max is not 0, this is the lower bound of the randomly selected height.
1897
+ height_max = 0,
1898
+ ^ Number of nodes the decoration can be at maximum.
1899
+ ^ If absent, the parameter 'height' is used as a constant.
1900
+ spawn_by = "default:water",
1901
+ ^ Node that the decoration only spawns next to, in a 1-node square radius.
1902
+ num_spawn_by = 1,
1903
+ ^ Number of spawn_by nodes that must be surrounding the decoration position to occur.
1904
+ ^ If absent or -1, decorations occur next to any nodes.
1905
+ }
1906
+
1860
1907
Chatcommand definition (register_chatcommand)
1861
1908
{
1862
1909
params = "<name> <privilege>", -- short parameter description
0 commit comments