Module extend_group.lua
Extend callbacks for all nodes in a specific group.
Iterates over items and applies extend_item to
every node belonging to the given group.
Uses core.override.
See alsoUsage
extend_group("leaves", {
after_destruct = function(next, pos, old_node)
minetest.remove_node(pos)
if next then next() end
end
})
-- To make sure it only targets nodes you do the following.
extend_group("leaves", function() end, core.registered_nodes)
Functions
-
# returns... (group_name, extend_def[, items]) -
Parameters
- group_name string Name of the group to target
- extend_def
table
Table of callbacks to extend (see
extend_item) - items {string,...} If you want to work on a subset of items/nodes. (optional)