diff options
| author | Tim <t4im@users.noreply.github.com> | 2015-02-02 03:14:26 +0100 | 
|---|---|---|
| committer | Tim <t4im@users.noreply.github.com> | 2015-02-02 03:16:15 +0100 | 
| commit | 13e878398cb388f03f453dbb9dcd7f9d1a66b0bc (patch) | |
| tree | 123d3be071053b7176553be6b6064ee30e13c135 | |
| parent | 2d0716be6f98809388a54d3d6e98ef7e05609699 (diff) | |
revert accidental revert (810ae99 -- autocrafter.lua) of f79956c
| -rw-r--r-- | autocrafter.lua | 11 | 
1 files changed, 9 insertions, 2 deletions
| diff --git a/autocrafter.lua b/autocrafter.lua index d3a4ccd..89559ba 100644 --- a/autocrafter.lua +++ b/autocrafter.lua @@ -153,8 +153,15 @@ local function on_output_change(pos, inventory, stack)  		if not input.items or input.type ~= "normal" then return end  		local items, width = normalize(input.items), input.width  		local item_idx, width_idx = 1, 1 -		inventory:set_width("recipe", 3) -		inventory:set_list("recipe", items) +		for i = 1, 9 do +			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  	end  	after_recipe_change(pos, inventory) | 
