Fix clocks not updating in itemframes
This commit is contained in:
parent
fb1464615c
commit
4c3b327e70
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user