diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index 335e917fee..e2bf05f6fa 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -67,11 +67,10 @@ minetest.register_globalstep(function(dtime) --modified simplemobs api - local pos1 = checkpos - local pos2 = object:getpos() - local vec = vector.subtract(pos1, pos2) - - vec = vector.add(pos2, vec) + -- Move object to player + local opos = object:getpos() + local vec = vector.subtract(checkpos, opos) + vec = vector.add(opos, vector.divide(vec, 2)) object:moveto(vec) object:get_luaentity().physical_state = false @@ -79,7 +78,6 @@ minetest.register_globalstep(function(dtime) physical = false }) - --fix eternally falling items minetest.after(0, function(object) local lua = object:get_luaentity()