1
0
Fork 0

Added on_save_effect support for mobs

potions_api_redo
the-real-herowl 2024-04-22 02:26:26 +02:00 committed by the-real-herowl
parent 641c3bee79
commit 7491ef5d44
1 changed files with 6 additions and 0 deletions

View File

@ -109,6 +109,12 @@ function mob_class:get_staticdata()
end
tmp._mcl_potions = self._mcl_potions
if tmp._mcl_potions then
for name_raw, data in pairs(tmp._mcl_potions) do
local def = mcl_potions.registered_effects[name_raw:match("^_EF_(.+)$")]
if def and def.on_save_effect then def.on_save_effect(self.object) end
end
end
return minetest.serialize(tmp)
end