diff options
author | ashtrayoz <33517241+ashtrayoz@users.noreply.github.com> | 2017-11-09 23:29:04 +1100 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-12-14 20:54:04 +0000 |
commit | abd8a30c0542c75622d8e2b46e3529c9e798d227 (patch) | |
tree | 0ced90b52d2ad08cfef8935ecf0d73192483134a /doc | |
parent | 6e5109fd46fa93335aa8bc7d5e3edb738980241f (diff) | |
download | minetest-abd8a30c0542c75622d8e2b46e3529c9e798d227.tar.gz minetest-abd8a30c0542c75622d8e2b46e3529c9e798d227.tar.bz2 minetest-abd8a30c0542c75622d8e2b46e3529c9e798d227.zip |
Add callback to preserve node metadata as item metadata
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index d3b493fc3..7ffd17a42 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -4710,6 +4710,13 @@ Definition tables ^ interval. Default: nil. ^ Warning: making a liquid node 'floodable' does not work and may cause problems. ]] + preserve_metadata = func(pos, oldnode, oldmeta, drops) --[[ + ^ Called when oldnode is about be converted to an item, but before the + node is deleted from the world or the drops are added. This is generally + the result of either the node being dug or an attached node becoming detached. + ^ drops is a table of ItemStacks, so any metadata to be preserved can be + added directly to one or more of the dropped items. See "ItemStackMetaRef". + ^ default: nil ]] after_place_node = func(pos, placer, itemstack, pointed_thing) --[[ ^ Called after constructing node when node was placed using minetest.item_place_node / minetest.place_node |