예제 #1
0
 public IItemRailing findNearestColoredTarget(IItemRailingTransfer itemwrapper) {
   IItemRailing[] arr = (IItemRailing[]) this.getNodes().toArray();
   Arrays.sort(
       arr,
       new RailingDistanceComparator.RailingColoredDistanceComparator(
           itemwrapper.getRailing(), itemwrapper.getColor()));
   return arr[0];
 }
예제 #2
0
 public IItemRailing chooseNextInstantGoal(IItemRailingTransfer itemwrapper) {
   IItemRailing[] arr =
       (IItemRailing[]) itemwrapper.getRailing().getConnectionMap().entrySet().toArray();
   Arrays.sort(arr, new RailingDistanceComparator(itemwrapper.getEndGoal()));
   return arr[0];
 }
예제 #3
0
 public IItemRailing findTargetForIItemTransfer(IItemRailingTransfer itemwrapper) {
   if (itemwrapper.getColor() == null) {
     return findNearestInventory(itemwrapper);
   }
   return findNearestColoredTarget(itemwrapper);
 }