Make unknown nodes diggable
This commit is contained in:
parent
dd9e7af507
commit
34f1e51580
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user