Skip to content

Commit

Permalink
Fix incorrect recipe registration for craftguide and i3
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallJoker committed Dec 16, 2024
1 parent 59643c4 commit 455092e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions technic/machines/register/recipes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ function technic.register_recipe_type(typename, origdata)
end

local function get_recipe_index(items)
if not items or type(items) ~= "table" then return false end
if type(items) ~= "table" then
return false
end

local l = {}
for i, stack in ipairs(items) do
l[i] = ItemStack(stack):get_name()
Expand Down Expand Up @@ -75,22 +78,22 @@ local function register_recipe(typename, data)
end
if (have_cg or have_i3) and technic.recipes[typename].output_size == 1 then
local result = data.output
if (type(result)=="table") then
if type(result) == "table" then
result = result[1]
end
local items = table.concat(data.input, ", ")
if have_cg and craftguide.register_craft then
craftguide.register_craft({
type = typename,
result = result,
items = {items},
items = data.input,
})
end
if have_i3 then
i3.register_craft({
type = typename,
result = result,
items = {items},
items = data.input,
})
end
end
Expand Down

0 comments on commit 455092e

Please sign in to comment.