forked from minetest-mods/moreblocks
Check for ndef before registering Stairs+ nodes.
This commit is contained in:
parent
5e0201968e
commit
aef4413eb9
@ -35,6 +35,7 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
|||||||
for _, name in pairs(default_nodes) do
|
for _, name in pairs(default_nodes) do
|
||||||
local nodename = "default:" .. name
|
local nodename = "default:" .. name
|
||||||
local ndef = minetest.registered_nodes[nodename]
|
local ndef = minetest.registered_nodes[nodename]
|
||||||
|
if ndef then
|
||||||
local groups = {}
|
local groups = {}
|
||||||
for k, v in pairs(ndef.groups)
|
for k, v in pairs(ndef.groups)
|
||||||
-- Ignore wood and stone groups to not make them usable in crafting:
|
-- Ignore wood and stone groups to not make them usable in crafting:
|
||||||
@ -54,5 +55,6 @@ for _, name in pairs(default_nodes) do
|
|||||||
tiles = ndef.tiles,
|
tiles = ndef.tiles,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user