mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 12:31:05 +01:00
Fixed crash when standing on campfire whilst food is cooking
This commit is contained in:
parent
5b212dd3fe
commit
d92296712c
1 changed files with 6 additions and 2 deletions
|
@ -108,13 +108,17 @@ function mcl_campfires.cook_item(pos, elapsed)
|
||||||
if entites then
|
if entites then
|
||||||
for _, entity in ipairs(entites) do
|
for _, entity in ipairs(entites) do
|
||||||
if entity then
|
if entity then
|
||||||
if entity:get_luaentity().name == "mcl_campfires:food_entity" then
|
luaentity = entity:get_luaentity()
|
||||||
|
if luaentity then
|
||||||
|
name = luaentity.name
|
||||||
|
if name == "mcl_campfires:food_entity" then
|
||||||
food_entity = entity
|
food_entity = entity
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if item ~= (ItemStack("") or ItemStack("nil")) then
|
if item ~= (ItemStack("") or ItemStack("nil")) then
|
||||||
-- Item hasn't been cooked completely, continue cook timer countdown.
|
-- Item hasn't been cooked completely, continue cook timer countdown.
|
||||||
if time_r and time_r ~= 0 and time_r > 0 then
|
if time_r and time_r ~= 0 and time_r > 0 then
|
||||||
|
|
Loading…
Reference in a new issue