Package buildcraft.transport

Examples of buildcraft.transport.TileGenericPipe


            foundBiggerSignal |= receiveSignal(tilePipe.pipe.bcPipePart.getSignalStrength()[color.ordinal()] - 1, color);
          }
        }
      }
      if (tile instanceof TileGenericPipe) {
        TileGenericPipe tilePipe = (TileGenericPipe) tile;

        if (BlockGenericPipe.isFullyDefined(tilePipe.pipe)) {
          if (isWireConnectedTo(tile, color)) {
            foundBiggerSignal |= receiveSignal(tilePipe.pipe.signalStrength[color.ordinal()] - 1, color);
          }
        }
      }
    }

    if (!foundBiggerSignal && signalStrength[color.ordinal()] != 0) {
      signalStrength[color.ordinal()] = 0;
      // worldObj.markBlockNeedsUpdate(container.xCoord, container.yCoord, zCoord);
      container.scheduleRenderUpdate();

      for (ForgeDirection o : ForgeDirection.VALID_DIRECTIONS) {
        TileEntity tile = container.getTile(o);
        if (tile instanceof LogisticsTileGenericPipe) {
          LogisticsTileGenericPipe tilePipe = (LogisticsTileGenericPipe) tile;

          if (LogisticsBlockGenericPipe.isFullyDefined(tilePipe.pipe)) {
            tilePipe.pipe.internalUpdateScheduled = true;
          }
        }
        if (tile instanceof TileGenericPipe) {
          TileGenericPipe tilePipe = (TileGenericPipe) tile;

          if (BlockGenericPipe.isFullyDefined(tilePipe.pipe)) {
            ((PipeClassReceiveSignal)tilePipe.pipe).triggerInternalUpdateScheduled();
          }
        }
View Full Code Here


    SimpleServiceLocator.pipeInformaitonManager.registerProvider(TileGenericPipe.class, BCPipeInformationProvider.class);
  }
 
  public boolean insertIntoBuildcraftPipe(TileEntity tile, LPTravelingItem item) {
    if(tile instanceof TileGenericPipe) {
      TileGenericPipe pipe = (TileGenericPipe)tile;
      if(BlockGenericPipe.isValid(pipe.pipe) && pipe.pipe.transport instanceof PipeTransportItems) {
        TravelingItem bcItem = null;
        if(item instanceof LPTravelingItemServer) {
          LPRoutedBCTravelingItem lpBCItem = new LPRoutedBCTravelingItem();
          lpBCItem.setRoutingInformation(((LPTravelingItemServer)item).getInfo());
View Full Code Here

  public boolean isTriggerActive(IStatementContainer container, IStatementParameter[] parameters) {
    if (!(container.getTile() instanceof TileGenericPipe)) {
      return false;
    }
   
    TileGenericPipe tile = (TileGenericPipe) container.getTile();
    int level = tile.redstoneInput;
    if (parameters.length > 0 && parameters[0] instanceof StatementParameterRedstoneGateSideOnly &&
        ((StatementParameterRedstoneGateSideOnly) parameters[0]).isOn) {
      level = tile.redstoneInputSide[((IGate) container).getSide().ordinal()];
    }
View Full Code Here

  public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) {
    if (BuildCraftCore.render == RenderMode.NoDynamic) {
      return;
    }

    TileGenericPipe pipe = (TileGenericPipe) tileentity;

    if (pipe.pipe == null) {
      return;
    }

    renderGatesWires(pipe, x, y, z);
    renderGates(pipe, x, y, z);

    PipeType pipeType = pipe.getPipeType();

    // do not use switch. we will be transitioning away from the enum
    if (pipeType == PipeType.ITEM) {
      renderSolids(pipe.pipe, x, y, z);
    } else if (pipeType == PipeType.FLUID) {
View Full Code Here

      return new ItemStack[] { gate };
    }

    @Override
    public void onAttachedPipe(IPipeTile pipe, ForgeDirection direction) {
      TileGenericPipe pipeReal = (TileGenericPipe) pipe;
      if (!pipeReal.getWorld().isRemote) {
        Gate gate = pipeReal.pipe.gates[direction.ordinal()];
        if (gate == null || gate.material != material || gate.logic != logic) {
          pipeReal.pipe.gates[direction.ordinal()] = GateFactory.makeGate(pipeReal.pipe, material, logic, direction);
          pipeReal.scheduleRenderUpdate();
        }
      }
    }
View Full Code Here

      }
    }

    @Override
    public void onDetachedPipe(IPipeTile pipe, ForgeDirection direction) {
      TileGenericPipe pipeReal = (TileGenericPipe) pipe;
      if (!pipeReal.getWorld().isRemote) {
        Gate gate = pipeReal.pipe.gates[direction.ordinal()];
        if (gate != null) {
          gate.resetGate();
          pipeReal.pipe.gates[direction.ordinal()] = null;
        }
        pipeReal.scheduleRenderUpdate();
      }
    }
View Full Code Here

    if (!(container instanceof IGate)) {
      return false;
    }
   
    IGate gate = (IGate) container;
    TileGenericPipe tile = (TileGenericPipe) gate.getPipe().getTile();
    int inputLevel = tile.redstoneInput;
    if (parameters.length > 0 && parameters[0] instanceof StatementParameterRedstoneGateSideOnly &&
        ((StatementParameterRedstoneGateSideOnly) parameters[0]).isOn) {
      inputLevel = tile.redstoneInputSide[gate.getSide().ordinal()];
    }
View Full Code Here

  }

  @Override
  public boolean canPipeConnect(TileEntity tile, ForgeDirection side) {
    if (tile instanceof TileGenericPipe) {
      TileGenericPipe tilePipe = (TileGenericPipe) tile;

      if (tilePipe.pipe instanceof PipeItemsStripes) {
        return false;
      }
    }
View Full Code Here

    TileEntity entity = world.getTileEntity(posX, posY, posZ);
    if (!(entity instanceof TileGenericPipe)) {
      return;
    }

    TileGenericPipe pipe = (TileGenericPipe) entity;
    if (pipe.pipe == null) {
      return;
    }

    if (!(pipe.pipe.transport instanceof PipeTransportFluids)) {
View Full Code Here

    TileEntity entity = world.getTileEntity(packet.posX, packet.posY, packet.posZ);
    if (!(entity instanceof TileGenericPipe)) {
      return;
    }

    TileGenericPipe pipe = (TileGenericPipe) entity;
    if (pipe.pipe == null) {
      return;
    }

    if (!(pipe.pipe.transport instanceof PipeTransportItems)) {
View Full Code Here

TOP

Related Classes of buildcraft.transport.TileGenericPipe

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.