Skip to content

A possibility to override and/or remove a single decoration #12881

Open
@CowboyLva

Description

@CowboyLva

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @ Script APIFeature requestIssues that request the addition or enhancement of a feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions