forked from mtcontrib/pipeworks
parent
2d0716be6f
commit
13e878398c
@ -153,8 +153,15 @@ local function on_output_change(pos, inventory, stack)
|
|||||||
if not input.items or input.type ~= "normal" then return end
|
if not input.items or input.type ~= "normal" then return end
|
||||||
local items, width = normalize(input.items), input.width
|
local items, width = normalize(input.items), input.width
|
||||||
local item_idx, width_idx = 1, 1
|
local item_idx, width_idx = 1, 1
|
||||||
inventory:set_width("recipe", 3)
|
for i = 1, 9 do
|
||||||
inventory:set_list("recipe", items)
|
if width_idx <= width then
|
||||||
|
inventory:set_stack("recipe", i, items[item_idx])
|
||||||
|
item_idx = item_idx + 1
|
||||||
|
else
|
||||||
|
inventory:set_stack("recipe", i, ItemStack(""))
|
||||||
|
end
|
||||||
|
width_idx = (width_idx < 3) and (width_idx + 1) or 1
|
||||||
|
end
|
||||||
-- we'll set the output slot in after_recipe_change to the actual result of the new recipe
|
-- we'll set the output slot in after_recipe_change to the actual result of the new recipe
|
||||||
end
|
end
|
||||||
after_recipe_change(pos, inventory)
|
after_recipe_change(pos, inventory)
|
||||||
|
Loading…
Reference in New Issue
Block a user