Skip to content

Commit b14aa1c

Browse files
authored
Warn of biome ID re-allocation when unregistering or clearing biomes (#9359)
1 parent 4eb3baa commit b14aa1c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/lua_api.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4098,6 +4098,9 @@ Call these functions only at load time!
40984098
* `minetest.unregister_biome(name)`
40994099
* Unregisters the biome from the engine, and deletes the entry with key
41004100
`name` from `minetest.registered_biomes`.
4101+
* Warning: This alters the biome to biome ID correspondences, so any
4102+
decorations or ores using the 'biomes' field must afterwards be cleared
4103+
and re-registered.
41014104
* `minetest.register_decoration(decoration definition)`
41024105
* Returns an integer object handle uniquely identifying the registered
41034106
decoration on success. To get the decoration ID, use
@@ -4112,12 +4115,15 @@ Call these functions only at load time!
41124115
* If the function is called when loading the mod, and `name` is a relative
41134116
path, then the current mod path will be prepended to the schematic
41144117
filename.
4115-
* `minetest.clear_registered_ores()`
4116-
* Clears all ores currently registered.
41174118
* `minetest.clear_registered_biomes()`
41184119
* Clears all biomes currently registered.
4120+
* Warning: Clearing and re-registering biomes alters the biome to biome ID
4121+
correspondences, so any decorations or ores using the 'biomes' field must
4122+
afterwards be cleared and re-registered.
41194123
* `minetest.clear_registered_decorations()`
41204124
* Clears all decorations currently registered.
4125+
* `minetest.clear_registered_ores()`
4126+
* Clears all ores currently registered.
41214127
* `minetest.clear_registered_schematics()`
41224128
* Clears all schematics currently registered.
41234129

0 commit comments

Comments
 (0)