Skip to content

Commit 455092e

Browse files
committed
Fix incorrect recipe registration for craftguide and i3
1 parent 59643c4 commit 455092e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

technic/machines/register/recipes.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ function technic.register_recipe_type(typename, origdata)
3232
end
3333

3434
local function get_recipe_index(items)
35-
if not items or type(items) ~= "table" then return false end
35+
if type(items) ~= "table" then
36+
return false
37+
end
38+
3639
local l = {}
3740
for i, stack in ipairs(items) do
3841
l[i] = ItemStack(stack):get_name()
@@ -75,22 +78,22 @@ local function register_recipe(typename, data)
7578
end
7679
if (have_cg or have_i3) and technic.recipes[typename].output_size == 1 then
7780
local result = data.output
78-
if (type(result)=="table") then
81+
if type(result) == "table" then
7982
result = result[1]
8083
end
8184
local items = table.concat(data.input, ", ")
8285
if have_cg and craftguide.register_craft then
8386
craftguide.register_craft({
8487
type = typename,
8588
result = result,
86-
items = {items},
89+
items = data.input,
8790
})
8891
end
8992
if have_i3 then
9093
i3.register_craft({
9194
type = typename,
9295
result = result,
93-
items = {items},
96+
items = data.input,
9497
})
9598
end
9699
end

0 commit comments

Comments
 (0)