From 4979632dede67e7fa9fd3633c8c0648eca088511 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Mon, 25 Aug 2025 10:43:50 +0100 Subject: [PATCH] Update furnace.lua move any final replacement from "src" to "dst" --- mods/default/furnace.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mods/default/furnace.lua b/mods/default/furnace.lua index c3321448..afa532c6 100644 --- a/mods/default/furnace.lua +++ b/mods/default/furnace.lua @@ -175,6 +175,16 @@ 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]) + -- stop any final replacement from clogging "src" + local can_cook = core.get_craft_result({ + method = "cooking", width = 1, + items = {aftercooked.items[1]:to_string()}}) + + if can_cook.time == 0 and can_cook.item:to_string() == "" + and aftercooked.items[1]:to_string() ~= "" then + inv:set_stack("src", 1, "") + add_item_or_drop(inv, pos, aftercooked.items[1]) + end src_time = src_time - cooked.time update = true -- add replacement item to dst so they arent lost