TransWikia.com

How do I make a continuous loop of minecart rails without the carts merging into one another?

Arqade Asked on January 22, 2021

(Asking from my phone, so no pictures; will eventually put pictures in when I get the chance)

Version 1.16.4

So, I’ve made a minecart system that travels in a loop. It’s made of almost completely powered rails (with a few detector and plain rails), so the minecarts never stop. I have 6 minecarts travelling on it (3 regular; 3 chest) at one time. The track travels side-by-side, and it’s about 100 blocks long both ways.

The problem is, when I leave the area, travel to another dimension, or even just leave and then rejoin the game, I find the minecarts all merged into each other and I can’t separate them unless I destroy them. Unfortunately the area isn’t in or near the spawn chunk; about 30 chunks away, so I can’t have it always loaded.

Is this unavoidable, or is there something I can do?

One Answer

First off, you must synchronize them somehow. Carts picking different amount of items will have different momentum and speed, so they'll eventually meet up unless you re-adjust their gap. This is easiest done with a PEZ dispenser - a device for storing minecarts and deploying them on demand.

This is a typical design utilizing a fence gate. It's very simple but the gate must receive a very short pulse not to dispense multiple minecarts. (the attached Etho clock is good for such a source)

PEZ dispenser

The design utilizing a slab and a sticky piston to push minecarts onto the rail is more tolerant to different clock outputs (here - powered from a fader clock) though slightly more complex and less compact. You may also want to cover the minecart tower (say, with glass) to prevent accidentally bumping into it.

PEZ dispenser 2

They are also a reasonable way to store the minecarts when the farm is not in use - simply disable the clock and wait for all the minecarts to stack up.

This solves your problem if you're afking near your farm and dutifully shut it down before leaving. But if you leave your farm running and then leave, you're inviting trouble - by unloading it partially.

As long as the entire 'railway system' is contained within a single chunk (F3+G to display chunk borders) it's not a problem - cart positions get saved, their momentum is slightly affected, but the PEZ dispenser will even everything out as long as you don't skimp on powered rails and don't get your carts near to stop in between them (unloading slightly decreases the momentum).

The real trouble start if the rail crosses chunk border, and you go to a location where some of the chunks in the farm are loaded as entity-processing, and some (on the very border of the loaded area) are lazy chunks - in which all entities (including minecarts) freeze. In this case all carts in entity-processing area will cross over into the lazy chunk and clump up into one massive pile.

There are several ways around that, but none "bullet-proof". The easiest is just discipline. Shut the farm down properly before leaving, let the carts pile up in the PEZ dispenser awaiting next start of the farm. Another is building the farm in spawn chunks. They aren't as reliably "always loaded" as in the times of old, but you'd need a pretty bad set of circumstances to make some of them unload. As you mentioned elsewhere though, you're building a gold farm, and that implies the Nether. No spawn chunks there.

Last but not least - build a permaloader. It's a device that keeps an area of 3x3 chunks (with the chunk with it in the middle) permanently loaded as entity-processing.

This is a very simple, cheap and easy to build permaloader - you build two well-linked portals facing the same axis (either both X or both Z), and attach the rail structures to both, on respectively opposite sides (say, rails go on +X side of the portal in overworld, -X in the Nether.) Make sure to pass through the portal at least once.

permaloader without carts

Open the fencegate and start sending minecarts into the Nether. After placing 4th minecart, first minecart from the Nether should have returned and your permaloader is active - the area of 3x3 chunks around it is loaded for as long as the server is running (if the server restarts, you must revisit the area to load it and let it start going again.) Close the fencegate to stop it.

permaloader active

You'll be able to find many other designs - more lag-friendly, reliable, compact, and so on - I'm posting this one because it's exceptionally simple and this is not a question about permaloaders.

Correct answer by SF. on January 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP