Package logisticspipes.request.RequestTree

Examples of logisticspipes.request.RequestTree.workWeightedSorter


      List<ExitRoute> e = destination.getDistanceTo(r);
      if (e!=null) validSources.addAll(e);
    }
    // closer providers are good
    Collections.sort(validSources, new workWeightedSorter(1.0));
   
    List<Pair<IProvideItems,List<IFilter>>> providers = new LinkedList<Pair<IProvideItems,List<IFilter>>>();
    for(ExitRoute r : validSources) {
      if(r.containsFlag(PipeRoutingConnectionType.canRequestFrom)) {
        CoreRoutedPipe pipe = r.destination.getPipe();
View Full Code Here


      if(!r.isValidCache()) continue; //Skip Routers without a valid pipe

      List<ExitRoute> e = this.target.getRouter().getDistanceTo(r);
      if (e!=null) validSources.addAll(e);
    }
    workWeightedSorter wSorter = new workWeightedSorter(0); // distance doesn't matter, because ingredients have to be delivered to the crafter, and we can't tell how long that will take.
    Collections.sort(validSources, wSorter);
   
    List<Pair<CraftingTemplate, List<IFilter>>> allCraftersForItem = getCrafters(this.getStackItem(), validSources);
   
    // if you have a crafter which can make the top treeNode.getStack().getItem()
View Full Code Here

TOP

Related Classes of logisticspipes.request.RequestTree.workWeightedSorter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.