Examples of LaserData


Examples of buildcraft.core.LaserData

  @Override
  public void initialize() {
    super.initialize();

    if (laser == null) {
      laser = new LaserData();
    }
   
    laser.isVisible = false;
    laser.head = new Position(xCoord, yCoord, zCoord);
    laser.tail = new Position(xCoord, yCoord, zCoord);
View Full Code Here

Examples of buildcraft.core.LaserData

  }

  private void addSubBlueprint(BlockIndex index) {
    subBlueprints.add(index);

    LaserData laser = new LaserData(new Position(index), new Position(this));

    laser.head.x += 0.5F;
    laser.head.y += 0.5F;
    laser.head.z += 0.5F;
View Full Code Here

Examples of buildcraft.core.LaserData

      box.initialize(bluePrintBuilder);
      sendNetworkUpdate();
    }

    if (laser == null && direction != ForgeDirection.UNKNOWN) {
      laser = new LaserData();
      laser.head = new Position(xCoord + 0.5F, yCoord + 0.5F, zCoord + 0.5F);
      laser.tail = new Position(xCoord + 0.5F + direction.offsetX * 0.5F,
          yCoord + 0.5F + direction.offsetY * 0.5F,
          zCoord + 0.5F + direction.offsetZ * 0.5F);
      laser.isVisible = true;
View Full Code Here

Examples of buildcraft.core.LaserData

    pathLasers = new LinkedList<LaserData>();
    BlockIndex previous = null;

    for (BlockIndex b : path) {
      if (previous != null) {
        LaserData laser = new LaserData(new Position(previous.x + 0.5,
            previous.y + 0.5, previous.z + 0.5), new Position(
            b.x + 0.5, b.y + 0.5, b.z + 0.5));

        pathLasers.add(laser);
      }
View Full Code Here

Examples of buildcraft.core.LaserData

  public void createLaserAndConnect(TilePathMarker pathMarker) {
    if (worldObj.isRemote) {
      return;
    }

    LaserData laser = new LaserData
        (new Position(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5),
           new Position(pathMarker.xCoord + 0.5, pathMarker.yCoord + 0.5, pathMarker.zCoord + 0.5));

    LaserData laser2 = new LaserData (laser.head, laser.tail);
    laser2.isVisible = false;

    connect(pathMarker, laser);
    pathMarker.connect(this, laser2);
  }
View Full Code Here

Examples of buildcraft.core.LaserData

    p[4] = new Position(xMin, yMin, zMax);
    p[5] = new Position(xMax, yMin, zMax);
    p[6] = new Position(xMin, yMax, zMax);
    p[7] = new Position(xMax, yMax, zMax);

    lasers[0] = new LaserData (p[0], p[1]);
    lasers[1] = new LaserData (p[0], p[2]);
    lasers[2] = new LaserData (p[2], p[3]);
    lasers[3] = new LaserData (p[1], p[3]);
    lasers[4] = new LaserData (p[4], p[5]);
    lasers[5] = new LaserData (p[4], p[6]);
    lasers[6] = new LaserData (p[5], p[7]);
    lasers[7] = new LaserData (p[6], p[7]);
    lasers[8] = new LaserData (p[0], p[4]);
    lasers[9] = new LaserData (p[1], p[5]);
    lasers[10] = new LaserData (p[2], p[6]);
    lasers[11] = new LaserData (p[3], p[7]);

    return lasers;
  }
View Full Code Here

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

Examples of logisticspipes.routing.LaserData

  }

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

Examples of logisticspipes.routing.LaserData

  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

Examples of logisticspipes.routing.LaserData

    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
Copyright © 2018 www.massapi.com. 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.