From 190ce1b8113c43a448ea1cf91364e1dd92f8d537 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Tue, 16 Apr 2024 20:06:08 +0000 Subject: [PATCH] Fix crash after entering a minecart not on rails --- mods/ENTITIES/mcl_minecarts/carts.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_minecarts/carts.lua b/mods/ENTITIES/mcl_minecarts/carts.lua index 1db3c0150..6e4b9a528 100644 --- a/mods/ENTITIES/mcl_minecarts/carts.lua +++ b/mods/ENTITIES/mcl_minecarts/carts.lua @@ -248,7 +248,7 @@ function DEFAULT_CART_DEF:on_step(dtime) end -- Give achievement when player reached a distance of 1000 nodes from the start position - if vector.distance(self._start_pos, pos) >= 1000 then + if pos and vector.distance(self._start_pos, pos) >= 1000 then awards.unlock(self._driver, "mcl:onARail") end end