Examples of BlockIndex


Examples of buildcraft.api.core.BlockIndex

    iterateBpt(false);
  }

  public void createLasersForPath() {
    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(
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

    if (currentBuilder == null || (currentBuilder.isDone(this) || forceIterate)) {
      if (path != null && path.size() > 1) {
        if (currentPathIterator == null) {
          Iterator<BlockIndex> it = path.iterator();
          BlockIndex start = it.next();
          currentPathIterator = new PathIterator(start, it,
              ForgeDirection.values()[worldObj.getBlockMetadata(
                  xCoord, yCoord, zCoord)].getOpposite());
        }
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

      path = new LinkedList<BlockIndex>();
      NBTTagList list = nbttagcompound.getTagList("path",
          Constants.NBT.TAG_COMPOUND);

      for (int i = 0; i < list.tagCount(); ++i) {
        path.add(new BlockIndex(list.getCompoundTagAt(i)));
      }
    }

    done = nbttagcompound.getBoolean("done");
    fluidTank.readFromNBT(nbttagcompound);
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

      bptNBT.setTag("builderState", builderCpt);
    }

    if (currentPathIterator != null) {
      NBTTagCompound iteratorNBT = new NBTTagCompound();
      new BlockIndex((int) currentPathIterator.ix,
          (int) currentPathIterator.iy, (int) currentPathIterator.iz)
          .writeTo(iteratorNBT);
      bptNBT.setTag ("iterator", iteratorNBT);
    }
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

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

    NBTTagCompound linkedStationNBT = nbt.getCompoundTag("linkedStation");
    linkedDockingStationIndex = new BlockIndex(linkedStationNBT.getCompoundTag("index"));
    linkedDockingStationSide = ForgeDirection.values()[linkedStationNBT.getByte("side")];

    if (nbt.hasKey("currentStation")) {
      NBTTagCompound currentStationNBT = nbt.getCompoundTag("currentStation");
      currentDockingStationIndex = new BlockIndex(currentStationNBT.getCompoundTag("index"));
      currentDockingStationSide = ForgeDirection.values()[currentStationNBT.getByte("side")];

    }

    laser.readFromNBT(nbt.getCompoundTag("laser"));
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

   * Tries to receive items in parameters, return items that are left after
   * the operation.
   */
  public ItemStack receiveItem(TileEntity tile, ItemStack stack) {
    if (currentDockingStation != null
        && currentDockingStation.index().nextTo(new BlockIndex(tile))
        && mainAI != null) {

      return mainAI.getActiveAI().receiveItem(stack);
    } else {
      return stack;
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

  public ResourceIdBlock() {

  }

  public ResourceIdBlock(int x, int y, int z) {
    index = new BlockIndex(x, y, z);
  }
View Full Code Here

Examples of buildcraft.api.core.BlockIndex

  public ResourceIdBlock(BlockIndex iIndex) {
    index = iIndex;
  }

  public ResourceIdBlock(TileEntity tile) {
    index = new BlockIndex(tile);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFile.BlockIndex

    long expected = 0L;
    long actual = 0L;
   
    cl = BlockIndex.class;
    expected = ClassSize.estimateBase(cl, false);
    BlockIndex bi = new BlockIndex(Bytes.BYTES_RAWCOMPARATOR);
    actual = bi.heapSize();
    //Since the arrays in BlockIndex(byte [][] blockKeys, long [] blockOffsets,
    //int [] blockDataSizes) are all null they are not going to show up in the
    //HeapSize calculation, so need to remove those array costs from ecpected.
    expected -= ClassSize.align(3 * ClassSize.ARRAY);
    if(expected != actual) {
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.HFile.BlockIndex

    long expected = 0L;
    long actual = 0L;
   
    cl = BlockIndex.class;
    expected = ClassSize.estimateBase(cl, false);
    BlockIndex bi = new BlockIndex(Bytes.BYTES_RAWCOMPARATOR);
    actual = bi.heapSize();
    //Since the arrays in BlockIndex(byte [][] blockKeys, long [] blockOffsets,
    //int [] blockDataSizes) are all null they are not going to show up in the
    //HeapSize calculation, so need to remove those array costs from ecpected.
    expected -= ClassSize.align(3 * ClassSize.ARRAY);
    if(expected != actual) {
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.