trying to do this so dont have to hardcoded texture support for games, was using this for mcl before giving up
if not minetest.get_modpath("default") then
minetest.register_on_mods_loaded(function()
local top_chest_tex
for name, def in pairs(minetest.registered_nodes) do
if string.match((name:split(":")[2] or ""), "chest") and def.tiles and not def.mesh then
top_chest_tex = def.tiles[1]
end
end
if top_chest_tex then
minetest.override_item("bridges:bridge_auto", {tiles = {top_chest_tex}})
end
end)
end