2

Here's a rough outline of what I want

Empty cart stays still under an empty hopper

Hopper gets x items in it, the cart stays still

Once the hopper has emptied all its items into the cart, the cart runs backwards and forwards along the track, putting its items into hoppers below it, once the hopper is empty, it stops again underneath the empty hopper

Is something like this currently possible? I have it at the moment that the cart always moves, except when the hopper has items, which works, but when the cart is empty the noise annoys me and the other people in the area.

I tried putting a detector rail underneath the hopper so I could tell when the cart is there, but that then powers the hopper so its items don't drop into the cart.

3
  • it would be extremely helpful if you included screenshots (preferably) or some other means of detailed explanation(s) on how you have progressed to your current stage of your project.
    – Ender
    Commented Mar 27, 2014 at 14:30
  • Are you trying to modify this design so that you don't have to push a button, but just place items in a hopper that fills the cart?
    – gnovice
    Commented Mar 27, 2014 at 14:38
  • Yeah pretty much
    – TMH
    Commented Mar 27, 2014 at 14:40

5 Answers 5

2

From your description it sounds like you are most concerned with testing the contents of a hopper that is filling a minecart (either a chest minecart or a hopper minecart) and performing an action based on its empty or full state. This is good because it is quite easy to test, as opposed to testing the contents of the cart itself.

Since you mention in a comment that you are basically building off of my previous design, but adding an automatic option to send the minecart instead of pressing a button, I'll show you how to modify it accordingly:

enter image description here

After adding a hopper above the cart, add a comparator which powers a redstone torch. This will turn on when the hopper empties. This signal then powers a rising edge detector circuit that consists of a dropper feeding another hopper, which in turn feeds back into the dropper. Place a single item in the dropper. A comparator tests the contents of the hopper, and a repeater feeds the signal into the powered rail. Whenever the feeding hopper empties, the rail powers and sends the cart along.

2
  • Wow, that's actually quite elegant. It still suffers from the problem of having a full cart while the hopper isn't empty, meaning the cart won't move. Can't test for that without my proposed block swapper solution.
    – MBraedley
    Commented Apr 3, 2014 at 20:35
  • Just implementing that now. Whilst I see @MBraedley's point I don't think I will ever put in enough items to fill the cart at once, so that shouldn't be a problem.
    – TMH
    Commented Apr 5, 2014 at 0:27
5

So the biggest problem comes from the fact that in order to get a Comparator signal from a Storage or Hopper Minecart, the Minecart needs to be resting on detector rail.*

Hopper Minecarts and Comparator outputs

Obviously this is a problem, since you can't cause the Minecart to move using detector rail. For this you need a block swapper. The traditional ultra simple design doesn't seem to work anymore, so instead, you need to use some control circuitry. Luckily, I found a design on YouTube purpose built for block swappers:

You'll be swapping detector rail and powered rail in a horizontal fashion, like so:
rail block swapper

Notice the redstone torch behind the centre piston. It isn't obvious from the video that it's required.

Next we need to work out the wiring to trigger the block swapper. I did this to your specs which were basically (in psuedocode)

if(!cart.empty() && hopper.empty())
    block_swapper.trigger();

This isn't really ideal, since the cart can be full even if there's items left in the hopper. You would need to add || cart.full() to the above if statement to make it more useable.

Now, there's one more thing. You don't want to keep the Minecart racing back and forth after you send it off. In order to accomplish this, you need to trigger the block swapper a second time to replace the detector rail after the Minecart leaves. I accomplished this with a delay circuit like so: Block Swapper reset circuit

Finally, during my testing, I discovered that Storage Minecarts don't seem to work. They aren't being filled by the hopper, and I'm not sure why I'm guessing it's because there's a powered detector rail beneath it. Hopper Minecarts work just fine. Also, I've created an MCEdit schematic file that you can get here that contains the system shown in these images. It doesn't include the full cart detection logic either. Implementation of that is left to the reader.

*This was tested with the 1.8 snapshots. I don't know if this was always the behaviour, or was recently introduced.

5
  • Wow thanks for the great response, I've never used MCEdit so I'm going to have a play with that now and figure it out. I thought this was going to be complicated but I didn't realize how much. I'll see if I can fit this into the area I have for the circuit and report back my progress. Thank!
    – TMH
    Commented Mar 27, 2014 at 18:40
  • Some of the Redstone can be condensed. For instance, it might be possible to put the block swapper circuit under the block swapper.
    – MBraedley
    Commented Mar 27, 2014 at 19:23
  • Fantastic solution. You can place the secondary signal delay before the rising edge detector and make it as short as 3 4-tick repeaters. Commented Sep 16, 2020 at 15:49
  • @danielson317 That's not a bad idea. It's been a long while since I did any redstone stuff, so you'll forgive me if I don't update the answer.
    – MBraedley
    Commented Sep 16, 2020 at 16:00
  • Also note this still works in 1.16.3 Java. Commented Sep 16, 2020 at 16:02
1

Really it isn't that hard. All you need to do is something like this:

enter image description here

The initial signal to start the cart can come from a comparator connected to the inputting hopper. After that the cart will continue until it is empty. Total delay is 3 ticks. The last repeater is just to prevent the redstone from connecting to the button. Underneath the cart is a powered rail.

1
  • A cool idea with 2 drawbacks. 1. you must prime the system by pressing a button. Not that bad but not fully automated either. 2. If the mine-cart empties it's contents then returns and gets filled from a hopper above it will not auto-send off. You must "re-prime" the system. This makes the block swapper method a bit more automatic and with fewer assumptions about the system. Commented Sep 16, 2020 at 15:45
1

I know this is an old thread, but here is a compact-ish solution to op's problem which acts in the way he described. Only issue with this design is that if the minecart with hopper gets completely emptied the system wont work. This is not usually a problem since we just stop the minecart before it's completely emptied and one coud place some other item in the hopper that is not allowed out with some filter if it is needed.

image of redstone build

image of redstone build

The comparator grabs a signal from the hopper-minecart and if the signal is strong enough activates the rs-nor latch that causes the other minecart to go in circles, pushing the minecart off the detector-rail. when the signal = 1 the rs-nor latch deactivates and the minecarts stop until full again. The hopper closest to the minecart is filled with three 64 stacks and one 38 stack, the other hopper is filled with one 32 stack

1
  • Using another minecart to push off the detector rail is really clever. Commented Sep 16, 2020 at 15:46
0

"Riffing" a little on the solution from gnovice (I play on Bedrock, but the principles in play are the same), I believe I have a workable solution to the full minecart piece. If the minecart is full, items will begin to back up into the feeding hopper. We can detect when it reaches 23+ items in the hopper with a comparator and activate the powered rail under the minecart at that time. This "tweak" to the design sends a signal across to the existing redstone "switches" when the signal output level from the hopper reaches 2 and keeps it on until it falls back under 2. This way, the powered rail remains active so the cart will continue bouncing back out to finish its circuit.

Minecart waiting for full load

The fact that the storage was full to begin with means that it will also be activating the detector rail on each trip, so it will continue to draw down the quantity of items in the feeder hopper until it falls below 23. If the cart's storage manages to empty itself while it's out on its circuit, it should have plenty of room for whatever's in the hopper at that point, so it can finish the "normal" operation.

The only condition under which this design may fail, to my knowledge, is if there are enough items to completely fill the minecart's storage plus between 1 and 22 additional items. I don't consider myself a redstone expert in any way, so there are probably better ways to accomplish even this, but in my testing so far, it all seems to be working normally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.