mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-22 23:33:44 +01:00
check if an item is leaves by groups
This commit is contained in:
parent
7d22092657
commit
1e4e35f5c8
@ -42,7 +42,8 @@ end
|
|||||||
|
|
||||||
local function is_leaves(name)
|
local function is_leaves(name)
|
||||||
return tubelib_addons1.FarmingNodes[name] ~= nil and
|
return tubelib_addons1.FarmingNodes[name] ~= nil and
|
||||||
tubelib_addons1.FarmingNodes[name].leaves == true
|
(tubelib_addons1.FarmingNodes[name].leaves == true or
|
||||||
|
minetest.get_node_group(name, "leaves") > 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function allow_metadata_inventory_put(pos, listname, index, stack, player)
|
local function allow_metadata_inventory_put(pos, listname, index, stack, player)
|
||||||
|
Loading…
Reference in New Issue
Block a user