mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-12-05 00:38:35 +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
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "PipeNetwork{" +
|
return "graph:\n\tnodes: " + this.graph.edgeSet() + "\n\tedges: " + this.graph.edgeSet() +
|
||||||
"\ngraph=" + this.graph +
|
"\nnodeToConnectedNodes:\n" + PipeNetwork.toNewlineDelimitedString(this.nodeToConnectedNodes.entrySet()) +
|
||||||
",\nnodeToConnectedNodes=" + this.nodeToConnectedNodes +
|
"\ntileCache:\n" + PipeNetwork.toNewlineDelimitedString(this.tileCache.keySet()) +
|
||||||
",\ntileCache=" + this.tileCache.keySet() +
|
"\npipeItems:\n" + PipeNetwork.toNewlineDelimitedString(this.pipeItems.entries()) +
|
||||||
",\npipeItems=" + this.pipeItems +
|
"\nnetworkLocks:\n" + PipeNetwork.toNewlineDelimitedString(this.networkLocks.entries()) +
|
||||||
",\nnetworkLocks=" + this.networkLocks +
|
"\nactiveCrafts:\n" + PipeNetwork.toNewlineDelimitedString(this.activeCrafts.entries());
|
||||||
",\nactiveCrafts=" + this.activeCrafts + '}';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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