Make unknown nodes diggable

This commit is contained in:
cora 2023-10-23 11:39:03 +02:00
parent dd9e7af507
commit 34f1e51580

View File

@ -25,4 +25,13 @@ minetest.register_node("unknower:unknown_placer", {
is_ground_content = false,
})
minetest.register_on_dignode(function(pos, oldnode, digger)
local def = minetest.registered_nodes[oldnode.name]
if not def and not minetest.get_modpath("funknown_nodes") then
local it = ItemStack("unknower:unknown_placer")
local o = minetest.add_item(pos,it)
if o then return true end
end
end)
minetest.register_alias("unknower:unknown", "unknower:unknown"..random)