From 50cbde6380a13d3f28da3740d6744ad699a3e88f Mon Sep 17 00:00:00 2001 From: 3raven Date: Mon, 30 May 2022 14:02:06 +0000 Subject: [PATCH] Atteempt to fix map on itemframe by using EliasFlickenstein in mcl2 --- mods/ITEMS/mcl_itemframes/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_itemframes/init.lua b/mods/ITEMS/mcl_itemframes/init.lua index 5dde560b7..5937a16cf 100644 --- a/mods/ITEMS/mcl_itemframes/init.lua +++ b/mods/ITEMS/mcl_itemframes/init.lua @@ -65,7 +65,10 @@ minetest.register_entity("mcl_itemframes:map", { }, on_activate = function(self, staticdata) self.id = staticdata - self.object:set_properties({textures = {mcl_maps.load_map(self.id)}}) + mcl_maps.load_map(self.id, function(texture) + -- will not crash even if self.object is invalid by now + self.object:set_properties({textures = {texture}}) + end) end, get_staticdata = function(self) return self.id