minetest.get_node_drops

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

minetest.get_node_drops("node name", "tool name")

Description

Returns list of item names. toolname should be either string or nil (bare hand).

Example

local itemstacks = minetest.get_node_drops("default:leaves")
for _, itemname in ipairs(itemstacks) do
	minetest.add_item({x=1,y=2,z=3}, itemname)
end
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox