From f83ad4f6c1b46e798e98ffd1d02137bf50c84c43 Mon Sep 17 00:00:00 2001 From: OgelGames Date: Fri, 15 May 2020 20:41:35 +1000 Subject: [PATCH] fix for cooking recipes with replacements fixes pandorabox-io/pandorabox.io#326 --- technic/machines/register/recipes.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/technic/machines/register/recipes.lua b/technic/machines/register/recipes.lua index f9e2458..2271b0b 100644 --- a/technic/machines/register/recipes.lua +++ b/technic/machines/register/recipes.lua @@ -74,6 +74,12 @@ function technic.get_recipe(typename, items) -- Compatibility layer if not result or result.time == 0 then return nil + -- Workaround for recipes with replacements + elseif not new_input.items[1]:is_empty() and new_input.items[1]:get_name() ~= items[1]:get_name() then + items[1]:take_item(1) + return {time = result.time, + new_input = {items[1]}, + output = {new_input.items[1], result.item}} else return {time = result.time, new_input = new_input.items,