Description
While working on a mod of mine I came across the need to override spawning of blueberry bush.
At the moment of writing the only(at lest the only simple way) is to unregister all decorations and reregister them, which breaks some other mod compatibility.
3 example mods: Biomes (by Atlante), Extra Biomes(by me), Ethereal(by TenPlus1)
Biomes can run with either of the others.
But running Extra Biomes with Ethereal has Ethereal biomes spawn with no decorations.
Running all three together suddenly makes all(or almost all) mod biomes from all three have their decorations spawn normally.
This random behavior could be avoided by:
(I'm new so these could be crude)
Example one
minetest.override_decoration({
name = "default:blueberry_bush",
deco_type = "schematic",
place_on = {"default:dirt_with_grass", "ebiomes:dirt_with_warm_steppe_grass", "ebiomes:dirt_with_grass_warm"},
sidelen = 16,
noise_params = {
offset = -0.004,
scale = 0.01,
spread = {x = 100, y = 100, z = 100},
seed = 697,
octaves = 3,
persist = 0.7,
},
biomes = {"grassland", "warm_steppe", warm_grassland},
y_max = 31000,
y_min = 1,
place_offset_y = 1,
schematic = minetest.get_modpath("default") .. "/schematics/blueberry_bush.mts",
flags = "place_center_x, place_center_z",
})
Example two
minetest.remove_decoration("default:blueberry_bush")
Then register anew.