Posted 10 April 2016 - 08:00 AM
I'm now playing FTB Infinity Evolved expert mode skyblock, and I found a problem with crafting automatization for machines that have no item type distinction between several input slots (like induction smelter). The problem is that logistics pipes are sending items asynchronously, and easily can jam the machine, rather by overflowing with single type of item or by sending two type of items from different recepies. That problem is especially huge with my policy: "One machine of a type for all autocrafting". So I used computercraft for solving it. Here is a program:
http://pastebin.com/v9wPh9Rb
Program has one command line argument - number of repeats of searching for recepies in inventory (for other than autocraft use), 0 for infinite cycles. Other configuration could be made by ajusting the 'configuration' table at the start of the program.
Parameters:
facing - direction where turtle is facing
machine - direction to the machine we're automating
output - direction to the outpu inventory
pause - waiting time in seconds between turtle searching for recepies to craft and, while crafting - between attempts to pull the crafting result
sources - inventories to search for items to craft, and recepies for them.
Sources structure:
side - direction to the inventory
recepies - list of recepies in format {['Component 1 visible name'] = amount-for-recipe, ['Component 2 visible name'] =amount-for-recipe, …. , ['result'] = 'Crafting result visible name'}
Acceptable directions are 'NORTH', 'EAST', 'SOUTH', 'WEST', 'UP', 'DOWN'.
Because the logistics pipes asynchronous style of work is still a thing, it's better to separate possibly overlapping recepies using different source inventories.
Configure machine to be accessible from the side you placed turtle. For thermal expansion machines, that's 'black rectangle' mode.
After that, connect crafting/chassis pipe to the output chest and satellite pipes to source chests, and confogure crafting pipe/modules.
Also notice, that the system does not handle the extra products, like slag in induction smelter. You will need to extract it separately, and that shoul be the only thing machine autoextracts.
And that's what you could get in the end.
Also, similar setup should work for different machines, like EnderIO Alloy Smelter.
http://pastebin.com/v9wPh9Rb
Program has one command line argument - number of repeats of searching for recepies in inventory (for other than autocraft use), 0 for infinite cycles. Other configuration could be made by ajusting the 'configuration' table at the start of the program.
Parameters:
facing - direction where turtle is facing
machine - direction to the machine we're automating
output - direction to the outpu inventory
pause - waiting time in seconds between turtle searching for recepies to craft and, while crafting - between attempts to pull the crafting result
sources - inventories to search for items to craft, and recepies for them.
Sources structure:
side - direction to the inventory
recepies - list of recepies in format {['Component 1 visible name'] = amount-for-recipe, ['Component 2 visible name'] =amount-for-recipe, …. , ['result'] = 'Crafting result visible name'}
Acceptable directions are 'NORTH', 'EAST', 'SOUTH', 'WEST', 'UP', 'DOWN'.
Because the logistics pipes asynchronous style of work is still a thing, it's better to separate possibly overlapping recepies using different source inventories.
Configure machine to be accessible from the side you placed turtle. For thermal expansion machines, that's 'black rectangle' mode.
After that, connect crafting/chassis pipe to the output chest and satellite pipes to source chests, and confogure crafting pipe/modules.
Also notice, that the system does not handle the extra products, like slag in induction smelter. You will need to extract it separately, and that shoul be the only thing machine autoextracts.
And that's what you could get in the end.
Also, similar setup should work for different machines, like EnderIO Alloy Smelter.