diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2016-10-09 09:17:44 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2016-10-09 09:17:44 +0100 |
commit | e3e00b24a0fedcc9960d0582612cff56a643e4c0 (patch) | |
tree | 77523ac2a81e9084a7b36e5dd2e701b536639986 /api.txt | |
parent | d2806eccf29b39ac3606c26ede5145685fa6842f (diff) |
added on_spawn function
Diffstat (limited to 'api.txt')
-rw-r--r-- | api.txt | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -139,7 +139,7 @@ The mob api also has some preset variables and functions that it will remember f mobs:register_spawn(name, nodes, max_light, min_light, chance, active_object_count, max_height, day_toggle) -mobs:spawn_specfic(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height, day_toggle) +mobs:spawn_specfic(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height, day_toggle, on_spawn) These functions register a spawn algorithm for the mob. Without this function the call the mobs won't spawn. @@ -154,6 +154,7 @@ These functions register a spawn algorithm for the mob. Without this function th 'min_height' is the maximum height the mob can spawn 'max_height' is the maximum height the mob can spawn 'day_toggle' true for day spawning, false for night or nil for anytime + 'on_spawn' is a custom function which runs after mob has spawned and gives self and pos values. ... also a simpler way to handle mob spawns has been added with the mobs:spawn(def) command which uses above names to make settings clearer: |