Tuesday, January 3, 2012

Minecraft: Sorting and smelting system using RedPower 2

Since building the Compact cobble generator I've been expanding my base. This article describes the sorting and automatic smelting system I built using RedPower 2.

The system uses seven sorting machines in series all sharing a common delivery tube. The use of a single delivery tube saves tubing and space in exchange for limiting your sort to fifteen categories (sixteen if you included unmatched items). While I used seven sorting machines, this system could be expanded to any number of sorters which would allow the sorting of hundreds of different items.


Photo 1: Seven sorting machines fed from the alchemical chest on the left (click to enlarge)


Of course you could use any number of sorters all using separate delivery tubes, but I wanted to see what could be done with an array of sorters using just a single delivery tube.


Overview diagram (click to enlarge)

  • A chest serves as the main input to the row of sorting machines.
  • The sorters assign color tags to the items which travel to the storage chests.
  • Items which traverse all 7 sorters without getting matched end up in an exceptions chest.
  • Ores which require smelting are sorted to the furnace feed chest.
  • 8 blulectric furnaces arranged in parallel make short work of smelting tasks.
  • Ingots from the furnaces are returned to the sorters, bypassing the input chest.
  • Also bypassing the input chest are the harvests from the sugar cane farm, a cactus farm, and a low-output passive tree farm.


An alchemical chest from the Equivalent Exchange mod serves as the input chest (see photo 1).

A filter pulls the items from the chest. Because the filter's inventory is empty, it will pull all the stacks from the input chest. (If you want single items pulled, use a transposer.)

Output from the filter enters the first sorting machine. It's powered with a blue alloy wire, and passes the power along to the adjacent sorters.

Since the sorting machines are all in-line and receive items already traveling through the tubes, they don't require a redstone signal to activate.


Configuration for the second sorter in the chain (click to enlarge)


The sorting machines are set to mode 5 and so sort everything they receive, and assign a color to items that don't match. This system uses pink for unmatched items.

Sorted items emerge from the sorters with a color tag. They go up and take the common delivery tube to their destinations. Unsorted items enter the next sorter in the chain.

To understand how this arrangement of sorters works it's useful to review two basics about tubes in RedPower 2:

  1. Routing in RedPower tubes selects the closest valid destination.
  2. Color tags keep wrong-colored items out.

After the first sorter, the inputs to the subsequent sorters in the chain are colored pink. All items emerging from these sorting machines want take the shortest path and enter the next sorter in the chain, but the pink input tubes keep everything out except the unsorted items. Thus the sorted items are forced up into the common delivery tube on top of the sorters.


Photo 2: The transposer near the last sorter (click to enlarge)


The last sorting machine in the chain sends its unmatched output to a chest (see photo 2). Note that the chest is further away than the route back to the last sorter's input, so unmatched items will loop through the last sorter unless special measures are taken. An in-line transposer causes the route to the chest to be seen as the shortest path for pink-tagged items. (If you have extra colors, you can eliminate the transposer by replacing the pink tag with an unused color.)


Photo 3: A filter pulls a few unsorted items (click to enlarge)


A filter grabs a few specific unsorted items for storage in a separate chest (see photo 3).

Currently the sorting machines still have many unused columns available for sorting additional items. Besides the default color of pink, this system currently has 13 colors assigned, for a total of 14. That leaves two colors for expansion.

Note that sorting machines in mode 5 without any items in their configuration columns don't think they have anything to do, and won't assign the default color. In other words, an empty sorting machine won't do anything. When you are testing the handling of unsorted items, make sure you put at least 1 item into each sorting machine, even if you don't assign it a color. [Update: This has been fixed in RedPower 2 Prerelease 4c.]


Photo 4: The common delivery tube connects to the storage chests (click to enlarge)


The common delivery tube leads from the sorting machines to the storage chests (see photo 4).

The two alchemical chests are not connected to the sorting tubes. The first stores the RedPower 2 supplies for color tagging the tubes.

The second is for tools storage, and uses an Equivalent Exchange mod item called the Talisman of Repair to keep things in good condition.

Here's the current assignment of storage chests:

Yellow: metal ingots
Light blue: redstone, glowstone, and covalence dust
Brown: wood products

White: RedPower rocks (marble and basalt)
Gray: stone, stone brick, and clay

Green: plant harvests
Lime: creature drops

Light gray: glass and RedPower microblocks
Blue: RedPower wiring and logic items
Orange: pistons and RedPower machines and tubes.

Cyan: diamonds and other valuables
Black: coal and flint


Photo 5: The red tube ends at the furnace feed (click to enlarge)


The red tube leads to the furnace feed chest (see photo 5).

A filter pulls items from the chest in stacks of 4 to send to the furnaces.

Stacks of 4 take 20 seconds to smelt, so the timer for the filter is set to 2.5 seconds, which is 20 seconds divided by 8 furnaces. I haven't done timing tests to optimize the timer setting. An optimum configuration would locate the filter adajcent to the first split in the tubes to minimize travel latency.


Photo 6: The 8-way Blulectric Furnace system (click to enlarge)


The feed tubes lead to the center of each furnace cluster; equal path lengths yield even distribution (see photo 6).

Return tubes go under the floor and lead to a retriever. An empty inventory causes it to pull any item from the furnace outputs. Equal length tubes ensure that the retriever pulls evenly, and it's on a fast timer.

Prior to prerelease 4 a transposer would have been needed for each furnace to gather the output, but a single retriever can pull the smelting results from all the furnaces.

Blulectric furnaces take input on the left side and make output available on the right, so each cluster has the furnaces rotated so that left faces in towards the feed and right faces out for the return.

The two furnace clusters could have been located closer together but I wanted to be able to walk between them.

A bank of 18 battery boxes powers the furnaces. Three blue alloy wires in the floor provide power to different sections of the two furnace clusters. Since the wires are rated for 100 amps, and each furnace pulls about 10 amps, there is no danger of overloading the power feeds.


Photo 7: Not quite enough solar panels for the job (click to enlarge)


The battery boxes are charged by an array of 22 solar panels, which is only half of the 40 panels that I should have to run the furnaces (see photo 7).

[Edit: I thanked them on the forum, but I'd like to express my gratitude to Minecraft Forum users Kyyshrrk, TheEnlightened, and Eloraam for clearing up my confusion about the way that color tags influence tube routing.]