1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-31 18:31:04 +00:00

Deepcopy pointed_thing for after_place_node, give it to on_rightclick too.

This commit is contained in:
Novatux 2014-01-11 17:23:28 +01:00
parent 3bbd280336
commit e21b29f422
3 changed files with 16 additions and 7 deletions

View file

@ -2205,10 +2205,12 @@ Node definition (register_node)
on_punch = func(pos, node, puncher),
^ default: minetest.node_punch
^ By default: does nothing
on_rightclick = func(pos, node, clicker, itemstack),
on_rightclick = func(pos, node, clicker, itemstack, pointed_thing),
^ default: nil
^ if defined, itemstack will hold clicker's wielded item
Shall return the leftover itemstack
^ Shall return the leftover itemstack
^ Note: pointed_thing can be nil, if a mod calls this function
on_dig = func(pos, node, digger),
^ default: minetest.node_dig
^ By default: checks privileges, wears out tool and removes node