1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2025-07-31 06:10:21 +02:00

routed spawn_tree() through a wrapper function so that other mods can hook into

plants_lib's calls to do something extra when a tree is generated at mapgen
time or spawned via the growing code.
This commit is contained in:
Vanessa Ezekowitz
2013-02-19 21:50:56 -05:00
parent a86c52cfa8
commit 6bfb454178
2 changed files with 21 additions and 2 deletions

View File

@ -22,6 +22,12 @@ All functions in plants lib are declared locally to avoid namespace collisions
with other mods. They are accessible via the "plantslib" method, e.g.
plantslib:spawn_on_surfaces() and so forth.
In the case of the growing code and the mapgen-based tree generator code, the
usual spawn_tree() calls used therein are routed through
plantslib:generate_tree() and plantslib:grow_tree(), which just directly call
the spawn_tree() function anyway. This way other mods can wedge into these
two calls by name, to execute something extra whenever a tree is spawned via
this library.
=====
spawn_on_surfaces(biome)