7

I have the following contraption:

enter image description here

I got it from this video, the only component not shown in the image is a redstone torch on the back side of the top stone block.

It works by stopping the minecart if there are items in the hopper, and letting the minecart go if the hopper is empty. This works fine if I manually put items in the chest above the hopper and I'm careful not to over-fill it.

Now, I would like to have this contraption at the end of a farm, some distance away (but not so much that the chunks aren't loaded) from my storage building.

Can I modify the contraption so that the cart leaves if the hopper is empty OR the cart is full?

Alternatively, can I make it so the cart leaves only when full?

0
8

This is a nice, compact, simple setup that works most of the time.

In particular, it will send the minecart away when the bottom hopper is empty (meaning the farm ran out of items) or when the cart can't accumulate any more items and the hopper accumulates enough to raise signal strength to 2. It will fail if the storage/farm has exactly between 1 and 21 items more than the minecart can fit. It will resume work as soon as the bottom hopper picks 22 extra items.

Since it doesn't ever look at cart contents, depending only on failing to place more than it can fit, it doesn't mind mixed and non-full stacks, so the problem from the other two designs is absent. It won't work with non-stackable items though.

enter image description here

1
  • I selected this option because of the simplicity. Otherwise I would have selected mine (the issue could be solved easily there by comparing the detector rail output to a 14 signal). I don't think I'll ever use this with non-stackable items. – Federico Mar 11 at 9:20
9

My solution isn't the prettiest, but it works.

First, a full minecart on top of a detector rail with a comparator emits a signal strength of 15 (Full cart - 1 item emits 14). We can also subtract signals using one comparator and a signal coming from the side so this measurement won't take too much space.

Full minecart on top of a detector rail emitting 1 signal

With this idea in mind, I made this contraption:

Full contraption

A 2x3 rail cycle with the exit (bottom right normal rail) always powered by a torch (not the case of the pic as the hopper is empty) which would result in the cycle being closed.

On the right side of the picture, we have the hopper with a comparator and torch, so when it is empty, it emits a signal, turning off the torch bellow the entrance rail, making it open (Exactly as seen in the pic)

On the left we have the same comparator situation described earlier, powering the torch below the entrance in case the cart is full.

This solution has minor problems:

  • It wont fill the cart chest at full speed (Should be around 0.8x as fast). This can be solved by putting more hoppers around the track, but that would mean more hoppers with comparators in a cramped space.
  • The cart is always moving, contributing to server lag (Even if in extremely small quantities).
  • Is relatively large for a simple task.

Major problem

In case you have a farm/storage that outputs different type of items, the cart will only leave if every stack has 64 units. This could even totally freeze the system by having the hopper flooded with one type of item and the car needing another one.

Cart Stuck:

Cart stuck

Hopper: Full Hopper

Cart: Not fully, clogged, cart

You can solve this by making the comparator from the detector rail receive less than 14 signals from the side. Each 2 stacks-ish represents a signal, except for 0 and 15 which are Full and Empty carts

5
  • ah, I see, you measure the cart "fullness" in a different sport w.r.t. the loading – Federico Mar 10 at 15:42
  • Yes, as it needs a detector rail to test and, and it needs to make a cycle so the detector rail won't activate the de-activated golden rail. @Federico Please, check the edit as it might be imporant depending on your case. – Bruno Rodrigues Mar 10 at 15:50
  • ah, good find! in the meanwhile I got an alternative design, gonna post an answer in a sec – Federico Mar 10 at 17:33
  • @Federico: A possible solution to the deadlock problem could be to also make the cart leave if the hopper is full. Although you might also need some kind of a delay to make sure that the hopper has time to feed some items into the cart if it can. (Alas, I don't actually know enough about redstone circuit design to try to implement that myself.) – Ilmari Karonen Mar 10 at 22:42
  • I mean, there is no real guarantee that the hopper will be full. Assuming it is a farm, it should, but it could take a while. – Bruno Rodrigues Mar 10 at 23:00
4

So, I was watching this video on the subject and at the shared timestamp there is a nice approach to stop a minecart: use an incline and two solid blocks.

So I came up with these solutions (click on the images for larger versions):

  1. here we let the cart go when it is full
    enter image description here

  2. here we let the cart go when it is full OR the hopper above it is empty
    enter image description here enter image description here

Still, this does not address the problem highlighted by Bruno, i.e. the cart could get stuck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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