prevent divizion by zero in mcl_furnaces

This commit is contained in:
kay27 2020-08-21 15:58:17 +04:00
parent 9c8098c203
commit 6efed85866

@ -321,7 +321,10 @@ local function furnace_node_timer(pos, elapsed)
local result = false
if active then
local fuel_percent = math.floor(fuel_time / fuel_totaltime * 100)
local fuel_percent = 0
if fuel_totaltime > 0 then
fuel_percent = math.floor(fuel_time / fuel_totaltime * 100)
end
formspec = active_formspec(fuel_percent, item_percent)
swap_node(pos, "mcl_furnaces:furnace_active")
-- make sure timer restarts automatically