Page 1 of 1

Reading the item/tool definition of the hand

PostPosted: Sun Jul 24, 2016 13:32
by Wuzzy
Hi.
I know I can read the definitions of pretty much all nodes, items, tools by using e.g. minetest.registered_tools.

However, this seems to be not the case for the hand (default tool). The identifier for the hand is the colon.
I know you can define it with something like this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_item(":", definition)


However, reading the information back seems not to be possible. I have tried to read the following entries but each of them were nil:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.registered_tools[":"]

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.registered_items[":"]

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.registered_craftitems[":"]


My question is: How can I read the tool or item definition of the hand?

Re: Reading the item/tool definition of the hand

PostPosted: Sun Jul 24, 2016 14:06
by rubenwardy
: is the override character. The name of the hand is "".

: Basically disables the name check, so names don't have to be of form modname:itemname it also disables existence checks, so that you can overwrite existing nodes

Re: Reading the item/tool definition of the hand

PostPosted: Sun Jul 24, 2016 16:46
by Wuzzy
Thanks, this was the answer.

I wonder if many people in Minetest would have asked the same or a similar question (just give a short shout-out if this applies to you). I am considering of adding this one to the FAQ, but only if it is really frequently asked (at least in theory). ;-)

PS: Is the fact that the ID of the hand is the empty string mentioned in lua_api.txt somewhere?