diff --git a/mods/ITEMS/mcl_throwing/init.lua b/mods/ITEMS/mcl_throwing/init.lua index 4d6dcfe5c..09a34c12f 100644 --- a/mods/ITEMS/mcl_throwing/init.lua +++ b/mods/ITEMS/mcl_throwing/init.lua @@ -58,7 +58,7 @@ function mcl_throwing.dispense_function(stack, dispenserpos, droppos, dropnode, end -- Staticdata handling because objects may want to be reloaded -local get_staticdata = function(self) +function mcl_throwing.get_staticdata(self) local thrower -- Only save thrower if it's a player name if type(self._thrower) == "string" then @@ -71,7 +71,7 @@ local get_staticdata = function(self) return minetest.serialize(data) end -local on_activate = function(self, staticdata, dtime_s) +function mcl_throwing.on_activate(self, staticdata, dtime_s) local data = minetest.deserialize(staticdata) if data then self._lastpos = data._lastpos diff --git a/mods/ITEMS/mcl_throwing/register.lua b/mods/ITEMS/mcl_throwing/register.lua index 027ff4e93..8ef1c73bf 100644 --- a/mods/ITEMS/mcl_throwing/register.lua +++ b/mods/ITEMS/mcl_throwing/register.lua @@ -9,8 +9,8 @@ local snowball_ENTITY={ collisionbox = {0,0,0,0,0,0}, pointable = false, - get_staticdata = get_staticdata, - on_activate = on_activate, + get_staticdata = mcl_throwing.get_staticdata, + on_activate = mcl_throwing.on_activate, _thrower = nil, _lastpos={}, @@ -23,8 +23,8 @@ local egg_ENTITY={ collisionbox = {0,0,0,0,0,0}, pointable = false, - get_staticdata = get_staticdata, - on_activate = on_activate, + get_staticdata = mcl_throwing.get_staticdata, + on_activate = mcl_throwing.on_activate, _thrower = nil, _lastpos={}, @@ -38,8 +38,8 @@ local pearl_ENTITY={ collisionbox = {0,0,0,0,0,0}, pointable = false, - get_staticdata = get_staticdata, - on_activate = on_activate, + get_staticdata = mcl_throwing.get_staticdata, + on_activate = mcl_throwing.on_activate, _lastpos={}, _thrower = nil, -- Player ObjectRef of the player who threw the ender pearl