diff --git a/mods/fireflies/init.lua b/mods/fireflies/init.lua index f5058a8..34d073a 100644 --- a/mods/fireflies/init.lua +++ b/mods/fireflies/init.lua @@ -4,6 +4,8 @@ local m_eth = minetest.get_modpath("ethereal") -- detecting cretive engine over creative privilegies local m_cre = minetest.get_modpath("creative") +-- check recent versions +local is_55 = has_feature("dynamic_add_media_table") -- firefly minetest.register_node("fireflies:firefly", { @@ -59,7 +61,7 @@ minetest.register_tool("fireflies:bug_net", { end if not m_cre then if creative.is_enabled_for(player:get_player_name()) then - itemstack:add_wear(256) + if is_55 then itemstack:add_wear(256) else itemstack:add_wear_by_uses(256) end return itemstack end end