From 35b1f72559474c90d57b461a98ef4e37b73efd75 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 12 May 2018 18:50:44 +0200 Subject: [PATCH] Add minimal itemframe LBM for compatability --- mods/ITEMS/mcl_itemframes/init.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_itemframes/init.lua b/mods/ITEMS/mcl_itemframes/init.lua index 4e7bd496f9..a4807f0edd 100644 --- a/mods/ITEMS/mcl_itemframes/init.lua +++ b/mods/ITEMS/mcl_itemframes/init.lua @@ -143,4 +143,14 @@ minetest.register_craft({ } }) -minetest.register_alias("itemframes:frame", "mcl_itemframes:item_frame") +minetest.register_lbm({ + label = "Update legacy item frames", + name = "mcl_itemframes:update_legacy_item_frames", + nodenames = {"itemframes:frame"}, + action = function(pos, node) + -- Swap legacy node, then respawn entity + node.name = "mcl_itemframes:item_frame" + minetest.swap_node(pos, node) + update_item(pos, node) + end, +})