mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-12-22 23:39:22 +01:00
parent
bca3026ac6
commit
98a2bf6a43
1 changed files with 1 additions and 0 deletions
|
@ -360,6 +360,7 @@ public class PipeNetwork implements ICapabilitySerializable<CompoundNBT>, GraphL
|
|||
// sort destinations first by their priority (eg trash pipes should be last)
|
||||
// and then by their distance from the specified node
|
||||
ret = Streams.stream(new BreadthFirstIterator<>(this.graph, node))
|
||||
.filter(p -> this.getPipe(p) != null)
|
||||
.sorted(Comparator.<BlockPos>comparingInt(p -> this.getPipe(p).getPriority()).reversed().thenComparing(paths::getWeight))
|
||||
.collect(Collectors.toList());
|
||||
this.nodeToConnectedNodes.put(node, ret);
|
||||
|
|
Loading…
Reference in a new issue