From 64c91afa4aeeaa037025ab73433c3cd0e58e6ff7 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 30 May 2017 06:00:26 +0200 Subject: [PATCH] Re-enable item physic after player follow failed --- mods/ENTITIES/mcl_item_entity/init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index 2ae27a49a..8af3550fc 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -392,6 +392,11 @@ core.register_entity(":__builtin:item", { -- If no collector was found for a long enough time, declare the magnet as disabled if self._magnet_active and (self._collector_timer == nil or (self._collector_timer > item_drop_settings.magnet_time)) then self._magnet_active = false + self.object:setvelocity({x=0,y=0,z=0}) + self.object:setacceleration({x = 0, y = -get_gravity(), z = 0}) + self.physical_state = true + self.object:set_properties({physical = true}) + return end if in_unloaded and self.physical_state == true then -- Don't infinetly fall into unloaded map