minetest.get_node_drops - Uberi/MineTest-API GitHub Wiki

minetest.get_node_drops

Description

Returns list of item names.

Syntax

[table](../type/table.html) get_node_drops([string](../type/string.html) nodename, [string](../type/string.html) toolname)

Examples

local itemstacks = minetest.get_node_drops("default:leaves")
for _, itemname in ipairs(itemstacks) do
	minetest.env:add_item({x=1,y=2,z=3}, itemname)
end
⚠️ **GitHub.com Fallback** ⚠️