You know the one that chops down the whole tree and gives you a pile of wood instead of having to harvest each block in the tree?
Zedm0n
-- Nodes in the group plant_dig go into the diggers inventory if the node below is dug
minetest.register_on_dignode(function(pos, node, digger)
if digger ~= nil then
if minetest.get_item_group(node.name, "plant_dig") ~= 0
-- or node.name == "default:papyrus" or node.name == "default:cactus"
then
local np = {x = pos.x, y = pos.y + 1, z = pos.z}
local nn = minetest.env:get_node(np)
if minetest.get_item_group(nn.name, "plant_dig") ~= 0 and node.name == nn.name then
minetest.node_dig(np, nn, digger)
end
end
end
end)Users browsing this forum: Bing [Bot] and 6 guests