Scenario
When there are several hoppers connected one to another and there is a flow of items coming through them, one can lock all of the hoppers simultaneously with a redstone signal.
Expected behaviour: all hoppers are locked in a state where each of the hoppers contains one item.
Actual behaviour: most of the time (not always though) some of the hoppers won't have any items in them. Which hopper will be empty is apparently random.
How to reproduce
1. Make a continuous flow of items through a line of hoppers
2. Lock all of the hoppers simultaneously with a redstone signal
3. Most likely, one or two of the hoppers do not contain an item
Sample contraption:
[media]Comparators are used to check if there are any items in the hopper. In this picture, one of the comparators is off, and indeed that hopper is empty.
[media]Furthermore
The example above uses locking the hoppers manually, and the empty hopper is random. However, one can make a redstone circuit that will automatically lock all hoppers whenever the last hopper in the line contains any items, similar to this:
[media]With this setup, the empty hopper is always the same one. Which exactly depends on repeater delay. For example, if repeater delay is set to 3 units, the empty hopper is always the ninth from the stream end, or when it's 1 unit, the fifth hopper is empty.
Additional details
When each hopper gets its signal a tiny bit later (1 repeater unit) than the previous one, everything works as expected, no hoppers are empty. The described behaviour only appears when multiple hoppers are locked simultaneously.
Affected versions
This behaviour was tested on two Windows machines on 1.19 and on 1.18.2.
Linked issues
Attachments
Comments 5
This seems to be a result of MC-11193. The redstone wire does not power all the hopper consistently at the same time, and thus the items inside each hopper will differ.
After further testing, this is not a result of MC-11193 as stated previously in my comment.
Hoppers take 8 game ticks to output items into a container, but the first item that travels through the hopper line offsets this as it travels quicker. The comparators do not display the 1 tick where each individual hopper is empty because it takes 2 ticks for the comparator to update it's state. (One tick is to check it's powered state, and then the next is used for updating it's scheduled ticks).
Here's a video showcasing the update times between repeaters, and comparators:
[media]
And here is a video showcasing a hopper line with the game frozen, moved a single tick at a time:
[media]
this behaviour really made my redstone build more complicated than it should've been