From 4c3b327e70fcc4a1fed6bba2ececf24cb2d9ef7a Mon Sep 17 00:00:00 2001 From: cora Date: Mon, 16 Dec 2024 16:57:26 +0100 Subject: [PATCH] Fix clocks not updating in itemframes --- mods/ITEMS/mcl_itemframes/init.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_itemframes/init.lua b/mods/ITEMS/mcl_itemframes/init.lua index 6d9aea183..b64671c5b 100644 --- a/mods/ITEMS/mcl_itemframes/init.lua +++ b/mods/ITEMS/mcl_itemframes/init.lua @@ -202,6 +202,10 @@ function mcl_itemframes.tpl_entity:on_activate(staticdata, dtime_s) end function mcl_itemframes.tpl_entity:on_step(dtime) + local def = minetest.registered_items[self._item] + if def and def._on_entity_step then + def._on_entity_step(self, dtime) + end self._timer = (self._timer and self._timer - dtime) or 1 if self._timer > 0 then return end self._timer = 1 @@ -209,9 +213,6 @@ function mcl_itemframes.tpl_entity:on_step(dtime) self.object:remove() return end - if minetest.get_item_group(self._item, "clock") > 0 then - self:set_item(ItemStack("mcl_clock:clock_"..mcl_clock.get_clock_frame())) - end end function mcl_itemframes.register_itemframe(name, def)