2

General Info
I'm playing on a server where they modified the hoppers to pass 8 items per tick instead of 1.

The system I want to build
I'm working on a casino game. User tosses 1 item into a hopper. This activates the casino making the user win or lose.

The problem
An item sorter is required to prevent the user from tossing in different items. Whether this is a hopper that only allowes 1 type of item to enter or 1 that filters out different item types does not matter.

The problem is the hoppers passing 8 items per tick. Say there are 18 stacked items inside a hopper. 1 is tossed in, activating the redstone signal. Instead of that 1 item passing through to the next hopper, 8 are passed through at once, leaving only 11 stacked items into the "sorter hopper". So now the next player would have to toss in 8 items instead of 1 in order for it to activate the redstone signal again.

Is there some way I can solve this issue?

Some extra info that might be usefull
The game doesn't require an item sorter to work. Without redstone, a single item gets passed through the hoppers just fine. I just need to prevent players from tossing in other items than the one required. So any solution to that end is perfect.

What I've tried myself
I've tried the classic item sorter method passing "wrong" items on to a different hopper and I've tried the "1 item type only" method where the input hopper only accepts that item type. Both resulted in the same issue.

2
  • 2
    Uuhh, a modded redstone challenge! Those are rare. And this is a pretty interesting one. I already have an idea: You could track before and after the sorting hopper whether an item went through the horizontal hopper line. And in the sorting hopper you have more of the to be sorted item and less (or no) filler items, so that it doesn't matter that 8 get removed instead of one. I'll make a complete system in a few hours. Apr 27, 2019 at 7:29
  • @FabianRöling I'd be very greatful for your help in this! I don't quite follow what you mean, but I'll await your complete solution to this :)
    – icecub
    Apr 27, 2019 at 7:39

1 Answer 1

2

This is the circuit I had in mind:

circuit

It's actually pretty simple: Put one comparator on the hopper before your standard sorting system and one on the hopper after it. Then you combine them with an AND gate where one side is delayed and one side is inverted.

The idea: An item that goes through the hopper before the sorting system (which are all items that go through the system) activate the first comparator and with a delay deactivates the first redstone torch, the redstone next to it and activates the second redstone torch and the lamp. But when an item also goes through the hopper after the sorting system (which is everything except soul sand in my example), then it activates the second comparator and keeps the redstone line active, thereby keeping the second redstone torch and the lamp inactive. The timing is set up so that the first redstone lamp toggling and the repeater on the second comparator activating happen at almost the same time. There is one game tick delay because of hopper speed, but the redstone torch luckily ignores one tick off pulses.
This means that only soul sand going through the system will activate the lamp, which is exactly what you wanted. What happens inside the sorting system doesn't matter for this circuit, as long as it takes all soul sand items and nothing else.

Of course you also have to make sure that your sorter doesn't lose its only soul sand item, for that you just need to put 8 of the to be sorted item into the first slot instead of one:

sorter

This circuit relies on the speed of hopper lines. I assume your modded hoppers just process batches of 8 and aren't actually faster in sending items through hopper lines. If they are, you have to adjust the repeaters on the first comparator accordingly.

This circuit can also be put on the same side as the sorting circuit, for that you just need to replace the first piece of redstone dust after the second comparator with another repeater and increase the delay in the first comparator by one more tick. I didn't do it in the screenshot to make the circuit clearer.

5
  • I've tested your system and it works brilliantly! Unfortunetely there seems to be a tick lag issue on this server causing it to work and not work at the same time. I dont suppose this system can be made lag safe? Still gonna upvote and accept though. The concept is just amazing!
    – icecub
    Apr 28, 2019 at 2:03
  • The only solution to the tick lag issue I can think of is keeping the signal from the second comparator active much longer so the lag delays from the first one get still caught by it. But so far I've been unable to get it working. Hopefully you have a better idea or are able to get that one to work.
    – icecub
    Apr 28, 2019 at 2:31
  • Since it's all server-side, it should already be reliable. But sure, you can always make the pulses longer and adjust the timing accordingly. Also, I just changed the instructions for building it on the same side as the sorting system, my previous version would have ruined the sorting. Apr 28, 2019 at 10:03
  • I just noticed that this system would probably lose 7 soul sand in the filter hopper when you only input one. And if you then input another single item, you lose the last one and 6 of the filler items and the filter is broken. I don't know a solution to that, apart from slowing down the input, which removes the entire benefit of the faster hoppers. Oct 15, 2020 at 10:50
  • Actually, it's not quite that, but if the hopper transmits more than the number of items in it by default before it gets locked again, then it would destroy the filter. I think that would mean that with 41 items in it, 7 items per server tick would be too fast. Oct 17, 2020 at 9:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .