From 764ff5512a26bc66cbe94a39b8132a57fe940f7f Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Fri, 26 Mar 2021 17:51:13 +0100 Subject: [PATCH 1/2] Fix server crash when boat passenger sneaks The crash occured when a player who is not a driver of a boat sneaked. --- mods/ENTITIES/mcl_boats/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_boats/init.lua b/mods/ENTITIES/mcl_boats/init.lua index 168e76b7..71ead146 100644 --- a/mods/ENTITIES/mcl_boats/init.lua +++ b/mods/ENTITIES/mcl_boats/init.lua @@ -243,7 +243,7 @@ function boat.on_step(self, dtime, moveresult) else local ctrl = self._passenger:get_player_control() if ctrl and ctrl.sneak then - detach_player(self._passenger, true) + detach_object(self._passenger, true) self._passenger = nil end end From 2aafb2f2d01a6ece9ed4642a7081c53dbf22f773 Mon Sep 17 00:00:00 2001 From: Nils Dagsson Moskopp Date: Sat, 19 Jun 2021 01:13:40 +0200 Subject: [PATCH 2/2] Fix server crash when dispensing an unknown item --- mods/ITEMS/REDSTONE/mcl_dispensers/init.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua index b6d0d2ef..4e8b2d2e 100644 --- a/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/init.lua @@ -129,6 +129,19 @@ local dispenserdef = { local stack_id = stacks[r].stackpos local stackdef = stack:get_definition() local iname = stack:get_name() + if not minetest.registered_items[iname] then + minetest.log( + "warning", + "Trying to dispense unknown item " .. + "“" .. iname .. "” " .. + "near (" .. + pos.x .. ", " .. + pos.y .. ", " .. + pos.z .. + ")" + ) + return + end local igroups = minetest.registered_items[iname].groups --[===[ Dispense item ]===]