nodecore-skyblock/mods/nc_api/util_node_is.lua

14 lines
455 B
Lua
Raw Normal View History

2019-10-23 03:57:37 +02:00
-- LUALOCALS < ---------------------------------------------------------
local minetest, nodecore
= minetest, nodecore
-- LUALOCALS > ---------------------------------------------------------
function nodecore.buildable_to(thing)
if not thing.name then
thing = nodecore.underride(thing, minetest.get_node(thing))
end
if thing.name == "ignore" then return end
local def = minetest.registered_items[thing.name] or {}
return def.buildable_to
end