Code: Select all
minetest.register_node("default:leaves", {
description = "Leaves",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tile_images = {"default_leaves.png"},
paramtype = "light",
material = minetest.digprop_leaveslike(1.0),
drop = {
max_items = 1,
items = {
{
-- player will get sapling with 1/20 chance
items = {'default:sapling'},
rarity = 20,
},
{
-- player will get leaves only if he get no saplings,
-- this is because max_items is 1
items = {''},
}
}
},
})