Package buildcraft.transport

Examples of buildcraft.transport.Pipe


  @Override
  public boolean onItemUseFirst(ItemStack itemStack, EntityPlayer entityPlayer, World worldObj, int x, int y, int z, int side, float var8, float var9, float var10) {
    if (worldObj.isRemote)
      return super.onItemUseFirst(itemStack, entityPlayer, worldObj, x, y, z, side, var8, var9, var10);

    Pipe pipe = BlockGenericPipe.getPipe(worldObj, x, y, z);

    if (BlockGenericPipe.isValid(pipe)) {
      if (pipe.hasGate()) {
        if (itemStack.stackTagCompound == null)
          itemStack.stackTagCompound = new NBTTagCompound();

        if (entityPlayer.isSneaking() && itemStack.stackTagCompound.hasKey("GateSettings")) {
          // apply settings to gate
View Full Code Here


                name1 = (PipeName) a;
                name = name1.name();
            }
        }
        pipe.name = name;
        Pipe dummyPipe = createPipe(pipe.itemID);
        if (dummyPipe != null) {
            pipe.setPipeIconIndex(dummyPipe.getIconIndexForItem());
            TransportProxy.proxy.setIconProviderFromPipe(pipe, dummyPipe);
        }
        DenPipesCore.proxy.registerPipeRendering(pipe);
        return pipe;
    }
View Full Code Here

  }

  @SuppressWarnings("rawtypes")
  private void onTypeFilterChange(EntityPlayer player, PacketUpdate packet) {

    Pipe pipe = getPipe(player.worldObj, packet.posX, packet.posY, packet.posZ);
    if (pipe == null)
      return;

    if (pipe instanceof PipeItemsPropolis)
      ((PipeItemsPropolis) pipe).pipeLogic.handleTypeFilterChange(packet.payload);
View Full Code Here

  }

  @SuppressWarnings("rawtypes")
  private void onGenomeFilterChange(EntityPlayer player, PacketUpdate packet) {

    Pipe pipe = getPipe(player.worldObj, packet.posX, packet.posY, packet.posZ);
    if (pipe == null)
      return;

    if (pipe instanceof PipeItemsPropolis)
      ((PipeItemsPropolis) pipe).pipeLogic.handleGenomeFilterChange(packet.payload);
View Full Code Here

  }

  @SuppressWarnings("rawtypes")
  private void onRequestFilterSet(EntityPlayer player, PacketCoordinates packet) {

    Pipe pipe = getPipe(player.worldObj, packet.posX, packet.posY, packet.posZ);
    if (pipe == null)
      return;

    if (pipe instanceof PipeItemsPropolis)
      ((PipeItemsPropolis) pipe).pipeLogic.sendFilterSet(player);
View Full Code Here

    item.setUnlocalizedName(clas.getSimpleName());
    GameRegistry.registerItem(item, item.getUnlocalizedName());

    BlockGenericPipe.pipes.put(item, clas);

    Pipe dummyPipe = BlockGenericPipe.createPipe(item);
    if (dummyPipe != null) {
      item.setPipeIconIndex(dummyPipe.getIconIndexForItem());
      TransportProxy.proxy.setIconProviderFromPipe(item, dummyPipe);
    }

    return item;
  }
View Full Code Here

  @Override
  public boolean checkForPipeConnection(TileEntity with, ForgeDirection side, LogisticsTileGenericPipe pipe) {
    if (with instanceof TileGenericPipe) {
      if (ReflectionHelper.invokePrivateMethodCatched(Boolean.class, TileGenericPipe.class, with, "hasBlockingPluggable", new Class[]{ForgeDirection.class}, new Object[]{side.getOpposite()}).booleanValue()) //((TileGenericPipe) with).hasBlockingPluggable(side.getOpposite())
        return false;
      Pipe otherPipe = ((TileGenericPipe) with).pipe;

      if (!BlockGenericPipe.isValid(otherPipe))
        return false;
     
      if(!(otherPipe.transport instanceof PipeTransportItems))
View Full Code Here

  }

  public static boolean canInteractWithItem(DockingStation station, IStackFilter filter, Class<?> actionClass) {
    boolean actionFound = false;

    Pipe pipe = station.getPipe().pipe;

    for (StatementSlot s : new ActionIterator(pipe)) {
      if (actionClass.isAssignableFrom(s.statement.getClass())) {
        StatementParameterStackFilter param = new StatementParameterStackFilter(s.parameters);
View Full Code Here

    return actionFound;
  }

  public static boolean canInteractWithFluid(DockingStation station, IFluidFilter filter, Class<?> actionClass) {
    boolean actionFound = false;
    Pipe pipe = station.getPipe().pipe;

    for (StatementSlot s : new ActionIterator(pipe)) {
      if (actionClass.isAssignableFrom(s.statement.getClass())) {
        StatementParameterStackFilter param = new StatementParameterStackFilter(s.parameters);
View Full Code Here

  }

  private class StationInventory implements IStationFilter {
    @Override
    public boolean matches(DockingStation station) {
      Pipe pipe = station.getPipe().pipe;

      for (IInvSlot robotSlot : InventoryIterator.getIterable(robot, ForgeDirection.UNKNOWN)) {
        if (robotSlot.getStackInSlot() == null) {
          continue;
        }
View Full Code Here

TOP

Related Classes of buildcraft.transport.Pipe

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.