From e9d994b74d43715b4bda8339714e70a09c85b6c2 Mon Sep 17 00:00:00 2001 From: Michieal Date: Tue, 26 Sep 2023 18:57:17 +0000 Subject: [PATCH] Fix Campifires API to not crash the server. Fixed the error in Campfires' On_RightClick() to not error out when called with a non-existent pointed_thing. --- mods/ITEMS/mcl_campfires/api.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/ITEMS/mcl_campfires/api.lua b/mods/ITEMS/mcl_campfires/api.lua index 212beefbe..cd23a964b 100644 --- a/mods/ITEMS/mcl_campfires/api.lua +++ b/mods/ITEMS/mcl_campfires/api.lua @@ -332,6 +332,9 @@ function mcl_campfires.register_campfire(name, def) elseif minetest.get_item_group(itemstack:get_name(), "campfire_cookable") ~= 0 then mcl_campfires.take_item(pos, node, player, itemstack) else + if not pointed_thing then + return itemstack + end minetest.item_place_node(itemstack, player, pointed_thing) end end,