From 8c81d3321308c8a4eafb7477ac8cafc127f7bb9e Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 4 Aug 2017 04:36:56 +0200 Subject: [PATCH] Prevent overcooking in furnaces --- mods/ITEMS/mcl_furnaces/init.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/mcl_furnaces/init.lua b/mods/ITEMS/mcl_furnaces/init.lua index 3001972aba..301c2498f1 100644 --- a/mods/ITEMS/mcl_furnaces/init.lua +++ b/mods/ITEMS/mcl_furnaces/init.lua @@ -190,16 +190,20 @@ local function furnace_node_timer(pos, elapsed) if inv:room_for_item("dst", cooked.item) then inv:add_item("dst", cooked.item) inv:set_stack("src", 1, aftercooked.items[1]) - src_time = src_time - cooked.time - update = true - -- Unique recipe: Put water into empty bucket after cooking wet sponge + -- Unique recipe: Put water into empty bucket after cooking wet sponge successfully if srclist[1]:get_name() == "mcl_sponges:sponge_wet" then if inv:get_stack("fuel", 1):get_name() == "mcl_buckets:bucket_empty" then inv:set_stack("fuel", 1, "mcl_buckets:bucket_water") end end end + -- Note: If there was not enough space in the output, the item is not + -- cooked and the cooking progress is lost. + + -- Always reset cooking time + src_time = 0 + update = true end end else