diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-11-16 13:11:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 13:11:36 -0500 |
commit | b89eb605b7020998fbf5d7142033ceb5275b3f71 (patch) | |
tree | 8a9c8f89397e16811b9c0558b949e5cef804b3f2 /doc/lua_api.txt | |
parent | 6b6cd42ce4b8399181170f8e6a6b14dc050edcb9 (diff) | |
download | minetest-b89eb605b7020998fbf5d7142033ceb5275b3f71.tar.xz |
Warn about potential infinite loop in on_construct (#12967)
Co-authored-by: sfan5 <sfan5@live.de>
Diffstat (limited to 'doc/lua_api.txt')
-rw-r--r-- | doc/lua_api.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 3ac530dd4..b576863d6 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -8482,6 +8482,9 @@ Used by `minetest.register_node`. -- Node constructor; called after adding node. -- Can set up metadata and stuff like that. -- Not called for bulk node placement (i.e. schematics and VoxelManip). + -- Note: Within an on_construct callback, minetest.set_node can cause an + -- infinite loop if it invokes the same callback. + -- Consider using minetest.swap_node instead. -- default: nil on_destruct = function(pos), |