mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-12-04 16:28:34 +01:00
clean up the dump command's output
This commit is contained in:
parent
887bfed229
commit
9fc0c12bf9
1 changed files with 10 additions and 7 deletions
|
@ -104,13 +104,12 @@ public class PipeNetwork extends SavedData implements GraphListener<BlockPos, Ne
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PipeNetwork{" +
|
||||
"\ngraph=" + this.graph +
|
||||
",\nnodeToConnectedNodes=" + this.nodeToConnectedNodes +
|
||||
",\ntileCache=" + this.tileCache.keySet() +
|
||||
",\npipeItems=" + this.pipeItems +
|
||||
",\nnetworkLocks=" + this.networkLocks +
|
||||
",\nactiveCrafts=" + this.activeCrafts + '}';
|
||||
return "graph:\n\tnodes: " + this.graph.edgeSet() + "\n\tedges: " + this.graph.edgeSet() +
|
||||
"\nnodeToConnectedNodes:\n" + PipeNetwork.toNewlineDelimitedString(this.nodeToConnectedNodes.entrySet()) +
|
||||
"\ntileCache:\n" + PipeNetwork.toNewlineDelimitedString(this.tileCache.keySet()) +
|
||||
"\npipeItems:\n" + PipeNetwork.toNewlineDelimitedString(this.pipeItems.entries()) +
|
||||
"\nnetworkLocks:\n" + PipeNetwork.toNewlineDelimitedString(this.networkLocks.entries()) +
|
||||
"\nactiveCrafts:\n" + PipeNetwork.toNewlineDelimitedString(this.activeCrafts.entries());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -594,4 +593,8 @@ public class PipeNetwork extends SavedData implements GraphListener<BlockPos, Ne
|
|||
}
|
||||
}
|
||||
|
||||
private static String toNewlineDelimitedString(Collection<?> collection) {
|
||||
return collection.stream().map(c -> "\t" + c.toString()).collect(Collectors.joining("\n"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue