I want to modify a tool but I can't
Posted: Thu Mar 02, 2017 16:37
Hi!
In the mod that i'm making want to create this effect: when the player digs a node with a tool, that tool loses the hability to drop during X seconds. You can continue digging with this tool, but it do not drop never.
The first idea was to create a minetest.register_on_dig_node, check the metadata of the tool, and if the effect is in the metadata change the drop of the node. But it not works.
How do you thing I can do?
In the mod that i'm making want to create this effect: when the player digs a node with a tool, that tool loses the hability to drop during X seconds. You can continue digging with this tool, but it do not drop never.
The first idea was to create a minetest.register_on_dig_node, check the metadata of the tool, and if the effect is in the metadata change the drop of the node. But it not works.
How do you thing I can do?