Page 1 of 1

[dev] how get group from item

PostPosted: Fri Feb 12, 2016 00:18
by foxz
HI,

I need know all item registered in a group.
coz technic.extractor doesn't understand "group:leaves"...

Re: [dev] how get group from item

PostPosted: Fri Feb 12, 2016 00:32
by kaeza
There's no API function to do what you ask, but it's easily done by iterating over `minetest.registered_items` and comparing if the item has the group set and more than zero. I'll leave the coding as an exercise to the reader.

Also, in the future please post modding questions in the Modding Discussion subforum to keep things orderly :) I have moved this one there.

Re: [dev] how get group from item

PostPosted: Fri Feb 12, 2016 10:41
by foxz
sry, I haven't see it...

thankx