From 5ebf8f945050e9c74a3bb6784a0844d1fb68bdff Mon Sep 17 00:00:00 2001 From: red-001 Date: Sat, 6 May 2017 20:12:44 +0100 Subject: [CSM] add `on_item_use` (#5544) --- doc/client_lua_api.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/client_lua_api.md b/doc/client_lua_api.md index a4293500f..19947a525 100644 --- a/doc/client_lua_api.md +++ b/doc/client_lua_api.md @@ -669,6 +669,10 @@ Call these functions only at load time! * If any function returns true, the punch is ignored * `minetest.register_on_placenode(function(pointed_thing, node))` * Called when a node has been placed +* `minetest.register_on_item_use(func(item, pointed_thing))` + * Called when the local player uses an item. + * Newest functions are called first. + * If any function returns true, the item use is not sent to server. ### Sounds * `minetest.sound_play(spec, parameters)`: returns a handle * `spec` is a `SimpleSoundSpec` -- cgit v1.2.3