Examples of BlockIndex


Examples of buildcraft.api.core.BlockIndex

    readConfiguration = conf;
    RPCHandler.rpcServer(this, "setReadConfiguration", conf);
  }

  public void addSubBlueprint(TileEntity sub) {
    addSubBlueprint(new BlockIndex(sub));

    sendNetworkUpdate();
  }
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

    stopBefore = 0;
  }

  @Override
  public void start() {
    blockScanner = new PathFinding(robot.worldObj, new BlockIndex(robot), pathFound, 64, robot.getZoneToWork());
    blockScannerJob = new PathFindingJob(blockScanner);
    blockScannerJob.start();
  }
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

  @Override
  public void loadSelfFromNBT(NBTTagCompound nbt) {
    super.loadSelfFromNBT(nbt);

    if (nbt.hasKey("blockFound")) {
      blockFound = new BlockIndex(nbt.getCompoundTag("blockFound"));
    }
  }
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

    public boolean matches(DockingStation station) {
      boolean actionFound = false;

      Pipe pipe = station.getPipe().pipe;

      if (!station.index().nextTo(new BlockIndex(requested.requester))) {
        return false;
      }

      for (StatementSlot s : new ActionIterator(pipe)) {
        if (s.statement instanceof ActionStationRequestItemsMachine) {
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

  public ResourceIdRequest() {

  }

  public ResourceIdRequest(TileEntity tile, int i) {
    index = new BlockIndex(tile);
    localId = i;
  }
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

  @Override
  public void loadSelfFromNBT(NBTTagCompound nbt) {
    super.loadSelfFromNBT(nbt);

    if (nbt.hasKey("blockFound")) {
      blockFound = new BlockIndex(nbt.getCompoundTag("blockFound"));
    }
  }
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

          ActionStationAllowCraft.class)) {
        return false;
      }

      for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
        if (getUsableFurnace(new BlockIndex(station.x(), station.y(), station.z())) != null) {
          return true;
        }
      }

      return false;
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

      double a = robot.worldObj.rand.nextFloat() * 2.0 * Math.PI;

      x = (int) (Math.cos(a) * r + Math.floor(robot.posX));
      z = (int) (Math.sin(a) * r + Math.floor(robot.posZ));
    } else {
      BlockIndex b = zone.getRandomBlockIndex(robot.worldObj.rand);
      x = b.x;
      z = b.z;
    }

    for (int y = robot.worldObj.getHeight(); y >= 0; --y) {
      if (filter.matches(robot.worldObj, x, y, z)) {
        blockFound = new BlockIndex(x, y, z);
        terminate();
        return;
      } else if (!robot.worldObj.isAirBlock(x, y, z)) {
        return;
      }
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

  public ResourceIdAssemblyTable() {

  }

  public ResourceIdAssemblyTable(TileAssemblyTable tile) {
    index = new BlockIndex(tile);
  }
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

    if (initNBT != null) {
      iterateBpt(true);

      if (initNBT.hasKey("iterator")) {
        BlockIndex expectedTo = new BlockIndex(initNBT.getCompoundTag("iterator"));

        while (!done && currentBuilder != null && currentPathIterator != null) {
          BlockIndex bi = new BlockIndex((int) currentPathIterator.ix,
              (int) currentPathIterator.iy, (int) currentPathIterator.iz);

          if (bi.equals(expectedTo)) {
            break;
          }

          iterateBpt(true);
        }
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.