From dcf833907ec7eddcca76893593f5ec6b34f8cb90 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sun, 7 Apr 2024 07:13:40 +0000 Subject: [PATCH] Make sure carts get detatch if the rail under them is removed --- mods/ENTITIES/mcl_minecarts/movement.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_minecarts/movement.lua b/mods/ENTITIES/mcl_minecarts/movement.lua index 8881589d3..ba2ea827f 100644 --- a/mods/ENTITIES/mcl_minecarts/movement.lua +++ b/mods/ENTITIES/mcl_minecarts/movement.lua @@ -370,8 +370,6 @@ local function do_movement_step(self, dtime) -- Enter the new node handle_cart_enter(self, pos, next_dir) - try_detach_minecart(self) - -- Handle end of track if next_dir == staticdata.dir * -1 and next_dir.y == 0 then if DEBUG then print("Stopping cart at end of track at "..tostring(pos)) end @@ -437,6 +435,7 @@ local function do_movement( self, dtime ) -- causing large timesteps while dtime > 0 do local new_dtime = do_movement_step(self, dtime) + try_detach_minecart(self) update_train(self)