Posted on 2014/10/12 by

BFC – BigFriedChicken’s Cook and Sort machine

BFC – BigFriedChicken’s Cook and Sort machine

How does the BFC Vanilla edition sort cooked chicken, feathers, and eggs into specific chests?

An industrial cooking and sorting machine. This device is the soul of the BFC and automates the process of collecting, cooking, sorting and finally storing cooked chicken, feathers, eggs and any anomalies (ie: dirt blocks, uncooked chicken, etc) into containers (chests).

To begin the process, the chicken brood is enclosed over hoppers (in our case, 3), these hoppers are placed so that they output towards the next hopper in line, with the final hopper output dropping down into a dispenser.

The dispenser will not shoot out eggs unless it is powered. 

The mechanism that powers the dispenser is a circuit designed to launch eggs once they enter the dispenser through the hopper chain.  The circuit uses a comparator in the “compare signal strength” mode in order to compare the state of the dispenser with the feedback signal to detect incoming eggs and to power the dispenser to fire them. 

In “compare signal strength”, the comparator is off but

will compare its rear input to its two side inputs,

and so it is important that the comparator is properly configured so that its rear input faces the dispenser’s rear (figure 1).  

figure1

Figure 1. The comparator rear output is connected to the rear of a dispenser

figure2

Figure 2. The arrows show the circulation of power. The comparator will try and compare values on either side of it but cannot compare the repeater on the side because its power follows a linear tract. The X shows that the connection is not established and therefore ignored.

When there are objects in the dispenser, the comparator will compare that amount to its side inputs, these being red stone wire and a repeater. The comparator does not compare the signal to the repeater because the repeater’s output does not face the comparator (figure 2).  

The comparator compares the value in the dispenser to the red stone circuit to its left.  A repeater, its input towards the comparator, controls the rate at which the signal passes through the red stone circuit to ensure that the comparator’s signal does not instantaneously turn on the red stone wiring. This ensures that the comparator’s signal will be stronger than the red stone circuit.

Ex: if the dispenser has one egg, the comparator has a value of 1. It checks it’s side inputs and the red stone circuit will have a value of 0.  1 is bigger than 0, and therefore the Comparator turns on. 

In the second example, I explain one of the reasons for using a repeater directly after the comparator. Although not necessary, the repeater ensures that the red stone does not instantaneously power on when the comparator does.

Ex 2: the dispenser has one egg, the comparator has a value of 1. It checks it’s side input and server lag or a malfunctions, and because the system does not have a repeater to delay the signal, its value also appear as 1. 1 is not greater than 1 and therefore, no power. Without power, the dispenser does not do anything.

When the comparator turn on, a signal passes through the repeater, which delays it by a fraction of a second, and circulates both left and right on the red stone circuitry. On the left, the signal powers the red stone adjacent to the comparator and powers the red stone to 1. As we have seen, when the comparator and the red stone next to it have the same value, the system turns off.

Simultaneously, the right side powers a repeater, that powers a block which in turn powers the dispenser which shoots out the object (egg). By shooting out the object, the dispenser value decreases and as a result the comparator turns off.

There is no danger of overflow of eggs into the dispenser because the hoppers only ever allow one item to transfer at a time. This ensure that this system constantly turns on and then off for each egg.

figure3

Figure 3. Chicks on top of a slab and a dispenser dispensing lava.

The dispenser shoots the eggs into an enclosure to produce chicks and from them, cooked chicken. The eggs are launched into an enclosed chamber over a hopper with a half slab, some hatch as chicks. The chicks are therefore elevated above the regular block level and only have a half slab area to circulate. Since chicks are only half a block high, they can move freely. A full block above the hopper, contains lava produced by a dispenser (figure 3). This dispenser is powered by toggling a button – while ON it produces the lava, and OFF it retracts the lava. Since a fully matured chicken is a block in size, once the chicks grow up, they surpass their half slab of livable circulation and the lava cooks them. In most cases the dropped item, cooked chicken and feathers, will fall through the half slab and into the hopper underneath it which is positioned with its output towards a chest. In some cases, the dropped item will burn.

 

 

A row of hoppers aligned with their outputs towards the next in line, lies beneath the chest (figure 4). The hopper pulls the items out of the chest and down the conveyer belt. The last hopper at the end of the belt has its output leading down into another hopper that leads down and into a chest. This chest, at the end of the line, will collect any surplus items that are not configured in the regular sorting system.

figure4

Figure 4. The conveyor belt hoppers each have their output leading towards the next hopper. This ensures that items move fluidly.

 

figure7

Figure 5. Conveyor belt hoppers, sorting hoppers, and chest. Note that the red torch is ON, at the bottom, to indicate that the hopper is locked and will not pass down items.

Beneath this conveyor belt of hoppers are three evenly spaced red stone sorting circuits designed to store specific items into their respective chests. The system works by taking advantage of a hoppers ability to lock when powered and to draw similar items within its inventory and use it to power red stone. In this way, when items travel through the conveyer belt, specific items (in our case feathers, chickens and eggs), will fall down into a lower hopper when they match (figure 5). 

Hoppers work by shifting items in it towards its out put. In the assembly line, the items are pushed left, but, if there is a hopper underneath a hopper, items will fall down. When a hopper is empty, any items may travel through it, such is the case for the last chest on the conveyer belt. This chest collects any material our three configured hoppers will not collect. These configured hopper’s slots have been filled with 21 sticks and one chicken/feather/egg which is located in the first slot.

When a hopper’s slots are filled, it will try and collect additional material first through the first slot. For the sorting machine to function properly, one chicken (or desired item to be sorted) must be at the beginning of the slot line so that the hopper will constantly look for it. This hopper is specifically designed to allow only one item to travel through it (and into the next hopper below it which deposes it into a chest) at a time. This ensures that the sorting machine will never collect any sticks, but always the primary slot item.

figure5

Figure 6.

Just in case,

ex: 1 chicken, 6 sticks, 5 sticks, 5 sticks, 5 sticks (figure 6)

One chicken from the conveyer belt falls down into this hopper: 1 new chicken + old chicken = one chicken falls down into the lower hopper and into the chest before the hopper locks again (I will explain that process shortly). We still have 1 chicken, 6 sticks, 5 sticks, 5 sticks, 5 sticks and therefore the sorting machine will continue looking for chickens and not sticks.

Alright, so we now understand that the cooker function with a “compare signal strength” comparator coupled with repeaters to launch eggs into an enclosure that will hatch chicks that will cook when they mature into chickens. The cooked chicken then falls into a hopper located under the enclosure, into a chest, and then is sucked into the hopper conveyer belt which will then sort them into four categories: chicken, feathers, eggs and everything else. But how does the sorter work? Where does it obtain its power and ability to transfer only one item at a time down from the sorting hopper into the lower hopper and into the chest? Why don’t all the items in the sorting hopper (1 chicken, 6 sticks, 5 sticks, 5 sticks, 5 sticks) not fall down also? The answer, a comparator and repeater process again.

figure6

Figure 7. The comparator is on “Measure block state” mode. Out put towards the red stone wire. It is difficult to see, but sparks are coming out of the first block to show that it is powered. The second block of red stone wiring is not sparking.

Instead of using a “Compare signal strength” (CSS) comparator as we did with the cooking section of the BFC, the sorting area utilities a “measure block state”(MBS) comparator and its output facing two blocks of red stone wire (our circuit material). Unlike the CSS, the MBS “will treat certain blocks behind it as power sources and output a signal strength proportional to the block’s state.” This allows the user to control how many items fall into the lower hopper, and ensures that the sorting hopper does not empty itself out into the lower hopper. But how?

Alright, so the hopper is locked using a red stone torch set ON. The comparator has only enough power to power ONE of the red stone wires (figure 7). When one cooked chicken falls down into the sorting hopper, the additional power of one chicken will power the second red stone wire block, which will activate the repeater that will turn off the RED STONE TORCH long enough to allow one item to fall down into the unlocked hopper before locking again. The repeater ensures that only one item falls down at a time so that the sorting hopper does not empty itself out.

How does the comparator generate energy? Why does it only power one block when we have 1 chicken, 6 sticks, 5 sticks, 5 sticks, 5 sticks, but two blocks when there are two chickens?

It is not readily obvious how this works, but a member of the Minecraft Wiki community shared this mathematical formula to explain how to calculate signal strength from any given item.

signal strength = truncate(1 + ((sum of all slots’ fullnesses) / number of slots in container) * 14)

1 + ((sum of all slots’ fullness)/number of slots in container) x 14 = amount of red stone blocks that will be powered.

To begin, we must calculate the amount of items in our hopper and divide each by their full amount. In our case, the items we are using all stack up to a maximum of 64.

1/64 + 6/64 + 5/64 + 5/64 + 5/64 = 22/64

22/64 = 0.34375

0.34375 divided by amount of slots in a hopper (5) = 0.06875

0.06875 x 14 = 0.9625

0.9625 + 1 = 1.9625

Truncate this number and we get 1

therefore, this formula powers 1 red stone block.

It is important that the non-truncated number is 1.9625 because with an additional chicken, the truncate is 2.

22/64 + 1/64 = 23/64

= 0.359375

= 0.071875

= 1.00625

= 2.0624

truncate 2

With the second block powered, the repeater turns off the torch long enough for one chicken to fall down into the chest and return the power to 1. The sorting machine absolutely needs two blocks powered for items to fall.

Why not use other items such as signs that stack up to 16?

Using signs or other items that stack up to 16 actually impede the machines functionality:

ex: 1/64 (our chicken) + 2/16 + 1/16 +1/16 + 1/16

1/64 + 5/16

0.015625 + 0.3125

= 0.328125

= 0.065625

= 0.91875

=1.91875

= Truncate = 1.

BUT, if you add an additional chicken:

2/64 + 0.3125

= 0.34375

=0.06875

=0.9625

= 1.9625

truncate = 1

Not enough power.

Therefore, using items that stake up to 16 will decrease the amount of cooked chicken gained as this system would need 3 or more chickens before having enough power to let one pass. The other system ensures that the user has the most cooked chicken gain.

Why not add more signs? Adding just one additional sign will power two blocks and thus render the sorting machine useless as everything would empty out of the hoppers (as the constant power will allow the repeater to keep turning off the red stone torch and letting more items down into the chest). Using this energy, the system is able to collect cooked chicken and other material and place it into specific chests.

Have fun with your BFC

http://minecraft.gamepedia.com/Redstone_Comparator

Print Friendly