use of logisticspipes.routing.ServerRouter in project LogisticsPipes by RS485.
the class CoreRoutedPipe method doDebugStuff.
private void doDebugStuff(EntityPlayer entityplayer) {
//entityplayer.worldObj.setWorldTime(4951);
IRouter r = getRouter();
if (!(r instanceof ServerRouter)) {
return;
}
System.out.println("***");
System.out.println("---------Interests---------------");
for (Entry<ItemIdentifier, Set<IRouter>> i : ServerRouter.getInterestedInSpecifics().entrySet()) {
System.out.print(i.getKey().getFriendlyName() + ":");
for (IRouter j : i.getValue()) {
System.out.print(j.getSimpleID() + ",");
}
System.out.println();
}
System.out.print("ALL ITEMS:");
for (IRouter j : ServerRouter.getInterestedInGeneral()) {
System.out.print(j.getSimpleID() + ",");
}
System.out.println();
ServerRouter sr = (ServerRouter) r;
System.out.println(r.toString());
System.out.println("---------CONNECTED TO---------------");
for (CoreRoutedPipe adj : sr._adjacent.keySet()) {
System.out.println(adj.getRouter().getSimpleID());
}
System.out.println();
System.out.println("========DISTANCE TABLE==============");
for (ExitRoute n : r.getIRoutersByCost()) {
System.out.println(n.destination.getSimpleID() + " @ " + n.distanceToDestination + " -> " + n.connectionDetails + "(" + n.destination.getId() + ")");
}
System.out.println();
System.out.println("*******EXIT ROUTE TABLE*************");
List<List<ExitRoute>> table = r.getRouteTable();
for (int i = 0; i < table.size(); i++) {
if (table.get(i) != null) {
if (table.get(i).size() > 0) {
System.out.println(i + " -> " + table.get(i).get(0).destination.getSimpleID());
for (ExitRoute route : table.get(i)) {
System.out.println("\t\t via " + route.exitOrientation + "(" + route.distanceToDestination + " distance)");
}
}
}
}
System.out.println();
System.out.println("++++++++++CONNECTIONS+++++++++++++++");
System.out.println(Arrays.toString(ForgeDirection.VALID_DIRECTIONS));
System.out.println(Arrays.toString(sr.sideDisconnected));
System.out.println(Arrays.toString(container.pipeConnectionsBuffer));
System.out.println();
System.out.println("~~~~~~~~~~~~~~~POWER~~~~~~~~~~~~~~~~");
System.out.println(r.getPowerProvider());
System.out.println();
System.out.println("~~~~~~~~~~~SUBSYSTEMPOWER~~~~~~~~~~~");
System.out.println(r.getSubSystemPowerProvider());
System.out.println();
if (_orderItemManager != null) {
System.out.println("################ORDERDUMP#################");
_orderItemManager.dump();
}
System.out.println("################END#################");
refreshConnectionAndRender(true);
System.out.print("");
sr.CreateRouteTable(Integer.MAX_VALUE);
}
Aggregations