From 7f69e6ab9e22cd39559c8a64dda5eaa5607257a0 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Mon, 28 Oct 2024 21:30:44 -0500 Subject: [PATCH] Fix crash with minecart on activator rail --- mods/ENTITIES/mcl_minecarts/carts.lua | 2 ++ mods/ENTITIES/mcl_minecarts/carts/minecart.lua | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_minecarts/carts.lua b/mods/ENTITIES/mcl_minecarts/carts.lua index c4749153e..9b9cc0d6a 100644 --- a/mods/ENTITIES/mcl_minecarts/carts.lua +++ b/mods/ENTITIES/mcl_minecarts/carts.lua @@ -67,6 +67,8 @@ local function detach_driver(self) --print("No player object found for "..driver_name) end end +mod.detach_driver = detach_driver + function mod.kill_cart(staticdata, killer) local pos mcl_log("cart #"..staticdata.uuid.." was killed") diff --git a/mods/ENTITIES/mcl_minecarts/carts/minecart.lua b/mods/ENTITIES/mcl_minecarts/carts/minecart.lua index b736a4c03..600eedc5a 100644 --- a/mods/ENTITIES/mcl_minecarts/carts/minecart.lua +++ b/mods/ENTITIES/mcl_minecarts/carts/minecart.lua @@ -7,7 +7,7 @@ local mod = mcl_minecarts local PASSENGER_ATTACH_POSITION = mod.PASSENGER_ATTACH_POSITION local function activate_normal_minecart(self) - detach_driver(self) + mod.detach_driver(self) -- Detach passenger if self._passenger then