1

I've been building a somewhat large rail system and have started adding 3-way and 4-way junctions with redstone buttons to select the next direction and propel the minecart along. But that requires stopping and clicking on a button at each junction.

I began to wonder if there was a way to detect if the player had a specific item in their inventory which would automatically choose the right rail configuration to get them to a destination corresponding to that item. I have a feeling the answer is no but I'd be curious whether this has been tried and if it can be made to work using some other creative solution?

I understand that this can potentially be accomplished using command blocks, however we are not looking to start adding them (yet). So I'm looking for a creative vanilla Java (currently 1.14.4) solution which allows making a choice somehow at the hub rail station based on what the ultimate destination will be, and having the junctions be able to configure correctly (left/right) to get the player there. This will obviously tend to make the redstone complex and may not scale well so I'm thinking probably not more than a 5-10 destinations initially. I could make some of those hub stations where the player could manually move to another hub, make another choice, and continue on if needed.

I'm mainly looking for the validation of a concept that might work, not the actual build steps.

18
  • @Robotnik This question is about redstone, it's probably fair to assume that this question does not want to use commands. The other question is about commands. The questions may have a similar problem, but the solution will look very different, the other question is answered with "use these commands", this question is answered with "you cannot do this, but here is an alternative solution involving some complicated redstone setup"
    – user232393
    Commented Aug 15, 2019 at 11:51
  • Here are two ideas: You can hold wheat to attract some animal mobs, this may be usable in a way, though probably not reliable. You can use a chest minecart that follows you, or moves in front of you, it can be used to decide in what direction to turn. You could have one item per destination, rather than per junction. If you have a lot of destinations, then a setup like this may get very big, but it should be reliable. You could use renamed paper, where the name matches the destination.
    – user232393
    Commented Aug 15, 2019 at 12:00
  • Thanks @Robotnik, I have edited the question to indicate that I'm looking for a non-code block solution as we are not using code blocks in this world.
    – TimigenX
    Commented Aug 15, 2019 at 13:46
  • @bearb001 Thanks for the suggestions. I will explore the chest minecart in front or behind. I could see how you could use a detector rail to assess how full it is to make a routing choice...
    – TimigenX
    Commented Aug 15, 2019 at 13:47
  • You could use a hopper to see if it is loaded with a certain item, too. You would have to almost completely fill the hopper with that item and it will only pull out that particular item from the chest minecart. If you then use the same hopper to put the item back in, then it'd be a system that resets itself, too.
    – user232393
    Commented Aug 15, 2019 at 13:50

3 Answers 3

1

You cannot test for an item in a players inventory by using only redstone (without killing the player).

However, you can have a chest minecart that moves in front of the player and check the contents of the chest.

This is what my test track looks like:

Test track

The minecart will follow the chest minecart in a circle indefinitely unless you put a paper into the chest minecart.

Here is a better view of the starting area and where the minecarts stop:

start and stop of the track

Minecarts appear to be a bit buggy when they are close to each other, this setup for starting seems to put the minecart a good distance behind the chest minecart.

Here is the junction itself:

image of the junction

When the chest minecart goes over the hopper, then the hopper will try to pull a piece of paper from the chest minecart. If it succeeds, then the chest minecart and the regular minecart with the player inside will both leave the ring track, the chest minecart will go past the hopper again and get the item back, which resets this junction.

For this to work you need to set the hopper up like this:

Part of the GUI of a hopper with 41 paper items in the first slot and 1 paper item in every other slot

You can use renamed items for this, so it would be possible to use papers named after the destination of where you want to go.

Note: this setup may vary a bit depending on what direction you are going. In this case the junction leads to the west.

Note 2: I don't work much with minecarts and rail systems, there may be mechanics in place that I didn't account for that would make this fail in some situations.

-1

I habe build exactly this contraption back in 2017, but it is a Redstone mess under the Station and it was hard work to secure it against user error.

https://wiki.natenom.de/minecraft/schematics/2017

It's based on the idea that a ticked in a Chest Cart in front of the player is read out at the switch with an item filter.

My Friends keep braking it and I lost interest because I have no one to play with.

Reconstructing the part in survival mode is a pain in the ass, and I would love to rebuild it with a Minecraft professional to make it easier.

I'm sure I haven't considered all the Redstone logic circuits.

1
  • Is this an answer, a lamentation, or an invitation?
    – Joachim
    Commented Jul 27, 2020 at 13:45
-1

This might give you some ideas...

Benefits of this design.

  1. You can replace the complicated station selection sytem with the player manually putting x number of items in the minecart_with_chest to travel x number of stations.
  2. You can make it a loop rail system so that the second journey doesn't need to be back to 'home' station, you just move x number of stations around the loop.
  3. The number of stations is only limited by the number of items you can fit in a chest.
  4. You don't need to 'follow' the rails with a line of redstone to transfer the signal.
  5. It is possible to have 2 players on the same stretch of rail but each going to different destinations. Items in chest can be 'payment' for travel e.g. 3 iron nuggets to travel 3 stations

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.