Fixed for you. You need to create new recipes instead of modifying existing.
In data-final-fixes:
++local new_recipes = {}
for _, recipe in pairs(data.raw["recipe"]) do
if (recipe.subgroup=="fill-barrel" or recipe.subgroup=="hp-fill-barrel") then
++ -- add new recipe
++ local new_recipe = util.table.deepcopy(data.raw["recipe"][recipe.name])
++ new_recipe.name = recipe.name.."-barreling-machine"
++ new_recipe.category = "fill-barrel"
++ new_recipe.hidden = true
++ new_recipe.enabled = true
++ table.insert(new_recipes, new_recipe)
++ -- hide existing recipe
if (settings.startup["fr-hide-barrel-recipes"].value == true) then
-- (line removed)
data.raw["recipe"][recipe.name].hidden = true
data.raw["recipe"][recipe.name].enabled = true
recipe_index[recipe.name] = true
end
end
if (recipe.subgroup=="empty-barrel" or recipe.subgroup=="hp-empty-barrel") then
++ -- add new recipe
++ local new_recipe = util.table.deepcopy(data.raw["recipe"][recipe.name])
++ new_recipe.name = recipe.name.."-barreling-machine"
++ new_recipe.category = "empty-barrel"
++ new_recipe.hidden = true
++ new_recipe.enabled = true
++ table.insert(new_recipes, new_recipe) -----------------------------------this
++ -- hide existing recipe
if (settings.startup["fr-hide-barrel-recipes"].value == true) then
-- (line removed)
data.raw["recipe"][recipe.name].hidden = true
data.raw["recipe"][recipe.name].enabled = true
recipe_index[recipe.name] = true
end
end
end
++data:extend(new_recipes)