From 4fedc3a31ee20813e4c81377b3bd2af05a26b858 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Thu, 7 Jan 2021 12:09:09 +0100 Subject: Add minetest.interact --- doc/client_lua_api.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/client_lua_api.txt b/doc/client_lua_api.txt index 3ee2cfba3..c7bbe1609 100644 --- a/doc/client_lua_api.txt +++ b/doc/client_lua_api.txt @@ -793,6 +793,16 @@ Call these functions only at load time! * Returns the time of day: `0` for midnight, `0.5` for midday ### Map +* `minetest.interact(action, pointed_thing)` + * Sends an interaction to the server + * `pointed_thing` is a pointed_thing + * `action` is one of + * "start_digging": Use to punch nodes / objects + * "stop_digging": Use to abort digging a "start_digging" command + * "digging_completed": Use to finish a "start_digging" command or dig a node instantly + * "place": Use to rightclick nodes and objects + * "use": Use to leftclick an item in air (pointed_thing.type is usually "nothing") + * "activate": Same as "use", but rightclick * `minetest.place_node(pos)` * Places the wielded node/item of the player at pos. * `minetest.dig_node(pos)` -- cgit v1.2.3