Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Also return the ObjectRef from minetest.spawn_falling_node() (#11184)
  • Loading branch information
benrob0329 committed Apr 13, 2021
1 parent bbe1203 commit a106bfd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion builtin/game/falling.lua
Expand Up @@ -407,7 +407,7 @@ local function convert_to_falling_node(pos, node)

obj:get_luaentity():set_node(node, metatable)
core.remove_node(pos)
return true
return true, obj
end

function core.spawn_falling_node(pos)
Expand Down
2 changes: 1 addition & 1 deletion doc/lua_api.txt
Expand Up @@ -4927,7 +4927,7 @@ Environment access
* Punch node with the same effects that a player would cause
* `minetest.spawn_falling_node(pos)`
* Change node into falling node
* Returns `true` if successful, `false` on failure
* Returns `true` and the ObjectRef of the spawned entity if successful, `false` on failure

* `minetest.find_nodes_with_meta(pos1, pos2)`
* Get a table of positions of nodes that have metadata within a region
Expand Down

0 comments on commit a106bfd

Please sign in to comment.