From d92296712c86e7508291c0fe3462ab7cc7060631 Mon Sep 17 00:00:00 2001 From: DinoNuggies4665 Date: Mon, 5 Jun 2023 16:54:03 -0600 Subject: [PATCH] Fixed crash when standing on campfire whilst food is cooking --- mods/ITEMS/mcl_campfires/api.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_campfires/api.lua b/mods/ITEMS/mcl_campfires/api.lua index 4136b4df7..5b1669b33 100644 --- a/mods/ITEMS/mcl_campfires/api.lua +++ b/mods/ITEMS/mcl_campfires/api.lua @@ -108,8 +108,12 @@ function mcl_campfires.cook_item(pos, elapsed) if entites then for _, entity in ipairs(entites) do if entity then - if entity:get_luaentity().name == "mcl_campfires:food_entity" then - food_entity = entity + luaentity = entity:get_luaentity() + if luaentity then + name = luaentity.name + if name == "mcl_campfires:food_entity" then + food_entity = entity + end end end end