Processing Cable

The **Processing Cable,** or **PC** is a function cable from the Simple Storage Network mod included in SkyFactory 4. It adds basic automation functions to any SSNetwork.

## Functions

The Processing Cable exists to implement two features:

1. Endlessly craft items while having only a single cable connection to the crafter.
2. Accept and execute requests to craft a certain amount of a specific item, while having only a single cable connection to the crafter.

It does this by combining the functions of the Export Cable and Import Cable and continuously switching between them in operation, while using Controller block settings as configuration.

*Huge caveat*: It is extremely and randomly buggy and tends to get stuck, requiring either product items to be added to the crafter or ingredients to be removed from it to restart frozen production. The tutorial below is not reliable in overcoming this in all cases.

If this does not sound worth it, it is possible to connect Packagers or Auto-Crafters reliably, using a few more blocks. The export cable can be configured with the Stock Upgrade and the Operation Upgrade. The item extraction can be done via a Storage Link Cable configured to output only and a higher priority value, attached to a sole Hopper, or a Hopper or an Item Extraction Cable leading into a block with an inventory of desired size.

### The GUI

The PC's GUI has several areas

* The left-side field dictates what items the PC will push into the attached inventory
* The right-side field dictates what items the PC will pull out of the attached inventory.
* The middle buttons (set to WE, for West, and EA, for East, respectively in the image above) let the player choose on what side of the attached block the block should consider the input or output channel to be attached. Some processing blocks require items that go into certain fields to come in from certain sides of the block. Using these buttons, the player can make the attached block *think* the item came from the side it needed to come from to go into the appropriate field.
* To the top right, the Import Field and Refresh button.
	+ ~~Function of the Import Field button is currently unclear.~~ The Import Filter button attempts to automatically find a suitable item filter based on the surrounding blocks. It can detect a recipe in a nearby automation block (i.e., Auto-Crafter, Solidifier, Hydrator from Cyclic) and set an appropriate filter on the cable. However, this functionality does not always work correctly with all mods and blocks.
	+ The Refresh button resets the PC to push mode if it got stuck waiting for a result. This function, however, has been reported to not work 100% of the time.
* The function of the central checkboxes are to indicate whether or not there is a process or checking amount of the type of entity. This is a more advanced concept that messes around with entity data types and advanced filtration. The "Meta (metadata)" checkbox is checked and the other boxes are unchecked by default and usually should not be changed.

### How it functions

The Processing Cable, as mentioned before, essentially functions as being both an Import Cable and Export Cable at the same time, switching between them continuously. There are, however, some key differences:

* When pushing, the PC will *only* push the items listed on the left-side field of the GUI into the attached block if it can find all of the items in the quantities specified. For example if set up like the image above, the Processing Cable will only push 4 Iron Acorns and 5 Iron Resin into the attached Packager if it can find 4 Iron Acorns and 5 Iron Resin in the SSNetwork it is attached to. It will not push *any* items into the attached block if even one of either is missing. For example, if the attached SSN were to only contain 4 Iron Acorns and 4 Iron Resin, it will not initiate a push until at least one more Iron Resin is put into the SSN.
* The PC *will not* initiate a new push until it has pulled the items on the right-side field of the GUI out of the attached block.

### The Controller

The Controller is an optional block that can be added to an SSN with a Processing Cable attached to it. Using a Controller, the player can request specific amounts of an item from any processing block attached to the same SSN through a Processing Cable. This way, it is possible to set a maximum of how many of a certain block you currently need.

it does not, however, set a maximum limit. It is not possible to use a controller to, for example, make sure there are always 64 Iron Amber in your SSN. When setting a number on the Controller, the attached processor will process and craft *that amount of items* and then stop crafting until a new processing request is made.

## Setup Tutorials

Any of the tutorials below can be tailored to the player's needs or be expanded upon.

### Automating Amber crafting using Processing Cables and a Packager or Auto-Crafter.

You will need the following:

* Enough SSN storage cables to connect your stuff to your SSNetwork
* A processing cable for each of your packagers and autocrafters
* 4 acorns and 10 (separated in two stacks of 5) resin of the same type.
* an amber of that same type.
* A packager or auto-crafter from *Cyclic*. Either will work.
* Power delivery to your auto-crafter or packager. You can use Flux Points, Energy Nodes with a GPS marker or just connect it with other power delivery, but it does need power.
* A lever.

The process is as follows. Order of operations is CRUCIAL, so follow these steps exactly:

* Make your packager or auto-crafter. Either will work. I'll be referring to the Packager from now on, but the Auto-Crafter essentially works the same way.
* Put it down in a place where it's easy to connect to your SSN. DON'T CONNECT THE PROCESSING CABLE YET
* Right-click on it, set it to "Redstone Only". Exit out of the menu and place a lever on the packager. Make sure it's set to OFF.
* Connect the processing cable and open the GUI. In the left-side field, put the stack of 4 acorns and one of the stacks of 5 resin. On the right side put the single block of amber.

What has now happened is that the processing cable (because you can't put 2 items in it in one operation) has already pushed the first item you put in the left-side menu into the Packager. It gave a push, now it's going to wait until it can pull the right-side item *out* before it'll push again. You're going to need to give it something to pull out of the Packager to put back into the SSN before it'll give another push.

* (Extra step if you're using an auto-crafter instead of a packager: go into the auto-crafter GUI. Set the recipe for amber in the center field)
* Go back into the packager GUI. You'll see 4 acorns in the left-side menu, but no resin. Take the stack of 5 resin from your inventory and put it into the left side menu.
* If you only want a specific amount of Amber crafted, this is where you go into the Controller GUI and set the desired amount.
* Go back out and flip the lever.
* Put one extra resin or acorn in the right part of the packager GUI to start the process

It should now start autocrafting all the amber it can make (or the amount you requested) from whatever storage you have hooked up to your SSNetwork. it should also, automatically, keep making more as soon as the depleted material gets restocked in case you didn't request an amount using the Controller.