Package logisticspipes.routing

Examples of logisticspipes.routing.LaserData


            //Add resistance
            pipeEntry.getValue().distanceToDestination += resistance;
          }
        }
        if (foundPipes.size() > beforeRecurseCount && pathPainter != null) {
          pathPainter.addLaser(startPipe.getWorld(), new LaserData(startPipe.getX(), startPipe.getY(), startPipe.getZ(), direction, connectionFlags));
        }
      }
    }
    setVisited.remove(new LPPosition(startPipe));
    distances.remove(new LPPosition(startPipe));
View Full Code Here


  }

  @Override
  public void readData(LPDataInputStream data) throws IOException {
    while(data.readBoolean()) {
      lasers.add(new LaserData().readData(data));
    }
  }
View Full Code Here

  private void handleRouteInDirection(final LogisticsTileGenericPipe pipe, ForgeDirection dir, ArrayList<ExitRoute> connectedRouters, final List<LaserData> lasers, EnumSet<PipeRoutingConnectionType> connectionType, final Log log) {
    if(LPConstants.DEBUG) {
      log.log("Size: " + connectedRouters.size());
    }
    lasers.add(new LaserData(pipe.xCoord, pipe.yCoord, pipe.zCoord, dir, connectionType).setStartPipe(firstPipe));
    firstPipe = false;
    HashMap<CoreRoutedPipe, ExitRoute> map = PathFinder.paintAndgetConnectedRoutingPipes(pipe, dir, Configs.LOGISTICS_DETECTION_COUNT, Configs.LOGISTICS_DETECTION_LENGTH, new IPaintPath() {
      @Override
      public void addLaser(World worldObj, LaserData laser) {
        if(pipe.getWorld() == worldObj) {
View Full Code Here

    ArrayList<LaserData> options = new ArrayList<LaserData>();
    options.addAll(lasers);
    Iterator<LaserData> iLasers = lasers.iterator();
    while(iLasers.hasNext()) {
      boolean compressed = false;
      LaserData data = iLasers.next();
      LPPosition next = new LPPosition(data.getPosX(), data.getPosY(), data.getPosZ());
      next.moveForward(data.getDir(), data.getLength());
      boolean found = false;
      do {
        found = false;
        Iterator<LaserData> iOptions = options.iterator();
        while(iOptions.hasNext()) {
          LaserData d = iOptions.next();
          if(d.getPosX() == next.getX() && d.getPosY() == next.getY() && d.getPosZ() == next.getZ()) {
            if(data.getDir().equals(d.getDir()) && data.getConnectionType().equals(d.getConnectionType())) {
              data.setLength(data.getLength() + d.getLength());
              next.moveForward(data.getDir(), d.getLength());
              found = true;
              iOptions.remove();
              lasers.remove(d);
              compressed = true;
            } else if(data.getDir().equals(d.getDir())) {
              data.setFinalPipe(false);
            }
          }
        }
      } while (found);
View Full Code Here

TOP

Related Classes of logisticspipes.routing.LaserData

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.