Pipes

From Horizon's End Wiki
Revision as of 19:19, 9 February 2025 by Peregri (talk | contribs)

Pipes are a method of quickly moving items between containers. All pipe networks will have 4 main components: an input container, an extractor (crafting table), a length of pipes (Glass or stained glass), and an output container.

Basics

A basic pipe setup. Items will move from the furnace to the chest and from the barrel to the dropper.

When an extractor and pipes are connected to a container, it will try to take items out of that container and move them down the pipe to another container. Items will not move from one colored pipe to a differently colored one.

Containers can be almost anything that holds items; this includes chests, barrels, droppers, dispensers, furnaces, and even decorated pots - but not hoppers.

When a pipe extracts items from a furnace, it extracts from the furnace output. When a pipe leads into a furnace, it will try to place items into both the bottom and top slots, but will only place items you can normally place into furnaces into them.

Pipe transfer is instant - the server moves as much as it possibly can from the input to the output in a single moment. It is impossible for you to lose an item in the middle of it going through a pipe.

Pathfinding

A very important detail for pipes is pathfinding. When the server is deciding where items should go in a pipe, and it comes to a crossroads where items could flow either way, it chooses one of those paths at random. This means that if your pipe system has lots of places where the glass splits and goes 2 different ways, your pipes will slow down a lot.

BAD GOOD
In this pipe system, items that enter from the leftmost chest hit a junction multiple times going down the pipe. If the pathfinding chooses to turn right instead of going straight at any of these points, the items will run into a dead end and have nowhere to go. With 5 junctions, this means pathfinding only succeeds 1/32 times. In this pipe system, the junctions are gone, and items will move through much faster. For every chest other than the leftmost, there is a 50% chance the pathfinding will turn left instead of right and hit a dead end, but these pipes will still be quite fast.

With the above example, the slowdown is small - it only takes a few seconds to work properly. However, every dead-end between the input and output doubles the time needed, and in large pipe networks, it quickly becomes way too slow. Thankfully, there are a few ways we can resolve ambiguity in our pipe systems.

Grindstones

This pipe system has 0 ambiguous junctions; pathfinding will always succeed.

Grindstones act like pipes, but will always transmit items in the way they are facing. Grindstones are the easiest and most popular method for resolving ambiguous junctions in pipes.

Panes

Panes accept and give items to glass of the same color, and also work as pipes - however, they don't work the exact same. When items flowing through a pane reach a junction, they will always try to keep moving straight first before turning. This can be very useful when you want items to move a certain way, but be careful! If your pane pipes are made poorly, they might end up never extracting correctly.

GOOD BAD
This system will be just as efficient as the earlier "good" piping example. None of the junctions will interrupt pathfinding because the panes will always move items in a straight direction. In this system, the bottom output chest will fill up, and the top chest will never receive items.