Package buildcraft.api.transport

Examples of buildcraft.api.transport.PipeWire


    container.scheduleRenderUpdate();
  }

  @Override
  public boolean isWireConnectedTo(TileEntity tile, Object oColor) {
    PipeWire color = (PipeWire) oColor;
    if(tile instanceof LogisticsTileGenericPipe) {
      LogisticsTileGenericPipe tilePipe = (LogisticsTileGenericPipe) tile;
      if (!LogisticsBlockGenericPipe.isFullyDefined(tilePipe.pipe)) {
        return false;
      }

      if (!tilePipe.pipe.bcPipePart.getWireSet()[color.ordinal()]) {
        return false;
      }

      return MainProxy.checkPipesConnections(container, tile);
    }
    if (!(tile instanceof TileGenericPipe)) {
      return false;
    }

    TileGenericPipe tilePipe = (TileGenericPipe) tile;

    if (!BlockGenericPipe.isFullyDefined(tilePipe.pipe)) {
      return false;
    }

    if (!tilePipe.pipe.wireSet[color.ordinal()]) {
      return false;
    }

    return tilePipe.pipe.transport instanceof PipeTransportStructure || Utils.checkPipesConnections(container, tile);
  }
View Full Code Here


    }
  }

  @Override
  public boolean receiveSignal(int signal, Object oColor) {
    PipeWire color = (PipeWire) oColor;
    if (container.getWorldObj() == null) {
      return false;
    }

    int oldSignal = signalStrength[color.ordinal()];

    if (signal >= signalStrength[color.ordinal()] && signal != 0) {
      signalStrength[color.ordinal()] = signal;
      container.pipe.internalUpdateScheduled = true;

      if (oldSignal == 0) {
        container.scheduleRenderUpdate();
      }
View Full Code Here

  }

  private static NBTTagCompound migrate(ItemStack stack, NBTTagCompound nbt) {
    Block block = null, blockAlt = null;
    int metadata = 0, metadataAlt;
    PipeWire wire = null;
    if (nbt.hasKey("id")) {
      block = (Block) Block.blockRegistry.getObjectById(nbt.getInteger("id"));
    } else if (nbt.hasKey("name")) {
      block = (Block) Block.blockRegistry.getObject(nbt.getString("name"));
    }
View Full Code Here

    if (result == null) {
      return null;
    }

    PipeWire wire = null;

    for (ItemStack stack : result.usedItems) {
      if (stack != null && stack.getItem() instanceof ItemPipeWire) {
        wire = PipeWire.fromOrdinal(stack.getItemDamage());
        break;
View Full Code Here

TOP

Related Classes of buildcraft.api.transport.PipeWire

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.