mirror of
https://github.com/pyrollo/display_modpack.git
synced 2024-11-12 13:20:30 +01:00
Check existence of material before registering stele
This commit is contained in:
parent
a7e80f4b98
commit
dc7aea71ee
|
@ -14,6 +14,8 @@ display_lib.register_display_entity("steles:text")
|
||||||
for _, material in ipairs(steles.materials) do
|
for _, material in ipairs(steles.materials) do
|
||||||
|
|
||||||
local ndef = minetest.registered_nodes[material]
|
local ndef = minetest.registered_nodes[material]
|
||||||
|
|
||||||
|
if ndef then
|
||||||
local parts = material:split(":")
|
local parts = material:split(":")
|
||||||
|
|
||||||
minetest.register_node("steles:"..parts[2].."_stele", {
|
minetest.register_node("steles:"..parts[2].."_stele", {
|
||||||
|
@ -62,4 +64,5 @@ for _, material in ipairs(steles.materials) do
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user