Package buildcraft.api.core

Examples of buildcraft.api.core.BlockIndex


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

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


          int y = from.index.y + dy;
          int z = from.index.z + dz;

          Node nextNode = new Node();
          nextNode.parent = from;
          nextNode.index = new BlockIndex(x, y, z);

          if (resultMoves[dx + 1][dy + 1][dz + 1] == 2) {
            endReached = true;
            return nextNode;
          }
View Full Code Here

    } else {
      if (maxDistanceToEnd == 0) {
        return end.x == x && end.y == y && end.z == z;
      } else {
        return BuildCraftAPI.isSoftBlock(world, x, y, z)
            && distance(new BlockIndex(x, y, z), end) <= maxDistanceToEnd;
      }
    }
  }
View Full Code Here

          if (rebuildDelay >= REBUILD_DELAY.length) {
            rebuildDelay = REBUILD_DELAY.length - 1;
          }
          rebuildQueue();
        }
        BlockIndex index = getNextIndexToFill(true);

        if (index != null && placeFluid(index.x, index.y, index.z, fluid)) {
          tank.drain(FluidContainerRegistry.BUCKET_VOLUME, true);
          rebuildDelay = 0;
        }
View Full Code Here

    if (bottomLayer != null) {
      if (bottomLayer.isEmpty()) {
        pumpLayerQueues.pollFirstEntry();
      }
      if (remove) {
        BlockIndex index = bottomLayer.pollFirst();
        return index;
      }
      return bottomLayer.peekFirst();
    }
View Full Code Here

  public void queueForFilling(int x, int y, int z) {
        if (y < 0 || y > 255) {
            return;
        }
    BlockIndex index = new BlockIndex(x, y, z);
    if (visitedBlocks.add(index)) {
      if ((x - xCoord) * (x - xCoord) + (z - zCoord) * (z - zCoord) > 64 * 64) {
        return;
      }

View Full Code Here

    nbt.setByte("stationSide", (byte) stationSide.ordinal());
  }

  @Override
  public void loadSelfFromNBT(NBTTagCompound nbt) {
    stationIndex = new BlockIndex(nbt.getCompoundTag("stationIndex"));
    stationSide = ForgeDirection.values()[nbt.getByte("stationSide")];
  }
View Full Code Here

    index = iIndex;
    side = iSide;
  }

  public DockingStation(TileGenericPipe iPipe, ForgeDirection iSide) {
    index = new BlockIndex(iPipe);
    pipe = iPipe;
    side = iSide;
    world = iPipe.getWorld();
  }
View Full Code Here

    nbt.setLong("robotId", robotTakingId);
  }

  @Override
  public void readFromNBT(NBTTagCompound nbt) {
    index = new BlockIndex (nbt.getCompoundTag("index"));
    side = ForgeDirection.values()[nbt.getByte("side")];
    linkIsMain = nbt.getBoolean("isMain");
    robotTakingId = nbt.getLong("robotId");
  }
View Full Code Here

    return lasers;
  }

  public static void handleBufferedDescription(ISynchronizedTile tileSynch) {
    TileEntity tile = (TileEntity) tileSynch;
    BlockIndex index = new BlockIndex(tile.xCoord, tile.yCoord, tile.zCoord);

    if (BuildCraftCore.bufferedDescriptions.containsKey(index)) {

      PacketUpdate payload = BuildCraftCore.bufferedDescriptions.get(index);
      BuildCraftCore.bufferedDescriptions.remove(index);
View Full Code Here

TOP

Related Classes of buildcraft.api.core.BlockIndex

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.