I'm making a goldfarm in minecraft. I'm making an automatic collection system. I have a hopper minecart run in an unloading loop.
I have an issue with the unloading loop. I want to use the same hopper mine-cart to collect and unload the items. I need a way to keep the cart in the unload loop until the cart is empty, then release it to the collection loop.
To switch between loops i have a switch that turns the track. I activate this switch automatically. The default
OFF state of the switch is to stay in the unloading loop. If an empty hopper-cart is detected, the switch is activated for a couple seconds and the hopper-cart is switched to the collection loop.
I'm sending an
ON pulse only when the cart is empty and otherwise having the output be
OFF. I used a detector rail as one output and a comparator measurement as another output. The comparator is
ON when the cart is over the detector rail and it has items and the detector rail is
ON when the cart is over the rail. Thus if the detector rail is ON but the comparator is
OFF I know the hopper-cart is empty. There are three states:
State Detector rail Comparator Desired output Cart full ON ON OFF Cart empty ON OFF ON No cart OFF OFF OFF
XOR behavior. I fed both outputs to an
XOR gate. Here is the problem, one of my inputs has a
1 tick delay (game ticks not red-stone ticks). I think this causes my
XOR gate to have transition states because the two inputs are not synchronized. This causes undesired behavior which I will give an example of:
Here is how my inputs are wired:
Detector-rail -> repeater(
2 tick delay) -> comparator(
2 tick delay) -> input to
Comparator reading detector-rail(
2 tick delay) -> repeater(
2 tick delay) -> input to
Everything else is redstone wire.
From my understanding of the above, both inputs should have exactly the same delay, reach the
XOR gate at the same time and keep the output of the
OFF. When I run a full hopper-cart over the detector-rail, my
XOR gate sends a
ON output pulse to the track switcher.
I suspect one of the inputs has a different delay and I think its because the comparator has to read the hopper-cart contents when it is on the detector rail. I'm unsure of the true cause.
What I want: when a full cart passes over the rail, the
XOR gate gets both inputs
ON ON at the exact same tick and the output stays
OFF. How do I synchronize these signals so I don't get
What I've tried:
I searched extensively on the internet and mine-craft forums for information on how to synchronize pulses. I couldn't find anything on pulse synchronization.
I tried asking friends on minecraft servers for help but none of them have gone this in depth with redstone.
I also tried adding a comparator to the
XORoutput to see if that would cause it to ignore
1 tickoutputs because according to The official Minecraft wiki "Redstone comparators usually do not respond to 1-tick fluctuations of power or signal strength".
For clarification purposes:
Here is what happens when A hopper-cart with items runs over the track (inputs are ON ON output should be OFF at all times)