Fix crash with minecart on activator rail

This commit is contained in:
teknomunk 2024-10-28 21:30:44 -05:00
parent bbd6ec7ff7
commit 4a44a80576
2 changed files with 3 additions and 1 deletions

View File

@ -67,6 +67,8 @@ local function detach_driver(self)
--print("No player object found for "..driver_name) --print("No player object found for "..driver_name)
end end
end end
mod.detach_driver = detach_driver
function mod.kill_cart(staticdata, killer) function mod.kill_cart(staticdata, killer)
local pos local pos
mcl_log("cart #"..staticdata.uuid.." was killed") mcl_log("cart #"..staticdata.uuid.." was killed")

View File

@ -7,7 +7,7 @@ local mod = mcl_minecarts
local PASSENGER_ATTACH_POSITION = mod.PASSENGER_ATTACH_POSITION local PASSENGER_ATTACH_POSITION = mod.PASSENGER_ATTACH_POSITION
local function activate_normal_minecart(self) local function activate_normal_minecart(self)
detach_driver(self) mod.detach_driver(self)
-- Detach passenger -- Detach passenger
if self._passenger then if self._passenger then