17 lines
442 B
Lua
Raw Normal View History

2012-04-29 13:24:10 -06:00
timber_nodenames={"default:papyrus", "default:cactus"}
minetest.register_on_dignode(function(pos, node)
local i=1
while timber_nodenames[i]~=nil do
if node.name==timber_nodenames[i] then
np={x=pos.x, y=pos.y+1, z=pos.z}
while minetest.env:get_node(np).name==timber_nodenames[i] do
minetest.env:remove_node(np)
minetest.env:add_item(pos, timber_nodenames[i])
np={x=np.x, y=np.y+1, z=np.z}
end
end
i=i+1
end
end)