Package buildcraft.transport

Examples of buildcraft.transport.TileGenericPipe


  @Override
  public LinkedList<IAction> getNeighborActions(Block block, TileEntity tile) {
    LinkedList<IAction> result = new LinkedList<IAction>();

    if (tile instanceof TileGenericPipe) {
      TileGenericPipe pipe = (TileGenericPipe) tile;
      if (pipe.pipe instanceof PipePowerSwitch) {
        result.add(ABO.actionToggleOnPipe);
        result.add(ABO.actionToggleOffPipe);
      }
    }
View Full Code Here


      pos.moveForwards(1.0);

      TileEntity tile = container.getTile(o);

      if (tile instanceof TileGenericPipe) {
        TileGenericPipe pipe = (TileGenericPipe) tile;
        if (BlockGenericPipe.isValid(pipe.pipe)) {
          neighbours.add(pipe);
          if (pipe.pipe.hasGate() && pipe.pipe.gate.isEmittingRedstone())
            powered = true;
        }
      }
    }

    if (!powered)
      powered = container.worldObj.isBlockIndirectlyGettingPowered(container.xCoord, container.yCoord, container.zCoord);

    if (lastPowered != powered) {
      for (TileGenericPipe pipe : neighbours) {
        pipe.scheduleNeighborChange();
        pipe.updateEntity();
      }
    }
  }
View Full Code Here

      pos.moveForwards(1.0);

      TileEntity tile = container.getTile(o);

      if (tile instanceof TileGenericPipe) {
        TileGenericPipe pipe = (TileGenericPipe) tile;
        if (BlockGenericPipe.isValid(pipe.pipe)) {
          neighbours.add(pipe);
          if (pipe.pipe.hasGate() && pipe.pipe.gate.isEmittingRedstone())
            powered = true;
        }
      }
    }

    if (!powered)
      powered = container.worldObj.isBlockIndirectlyGettingPowered(container.xCoord, container.yCoord, container.zCoord);

    if (lastPowered != powered) {
      for (TileGenericPipe pipe : neighbours) {
        pipe.scheduleNeighborChange();
        pipe.updateEntity();
      }
    }
  }
View Full Code Here

      pos.moveForwards(1.0);

      TileEntity tile = container.getTile(o);

      if (tile instanceof TileGenericPipe) {
        TileGenericPipe pipe = (TileGenericPipe) tile;
        if (BlockGenericPipe.isValid(pipe.pipe)) {
          neighbours.add(pipe);
          if (pipe.pipe.hasGate() && pipe.pipe.gate.isEmittingRedstone())
            powered = true;
        }
      }
    }

    if (!powered)
      powered = container.worldObj.isBlockIndirectlyGettingPowered(container.xCoord, container.yCoord, container.zCoord);

    if (lastPowered != powered) {
      for (TileGenericPipe pipe : neighbours) {
        pipe.scheduleNeighborChange();
        pipe.updateEntity();
      }
    }
  }
View Full Code Here

    this.slot = data.readInt();
    this.state = data.readBoolean();
  }

  public void update(EntityPlayer player) {
    TileGenericPipe pipe = getPipe(player.worldObj, posX, posY, posZ);
    if (pipe == null || pipe.pipe == null)
      return;

    if (!(pipe.pipe instanceof IYesNoChange))
      return;
View Full Code Here

      fluid = FluidRegistry.getFluid(nbt.getString("FluidName"));
    }
  }

  public void update(EntityPlayer player) {
    TileGenericPipe pipe = getPipe(player.worldObj, posX, posY, posZ);
    if (pipe == null || pipe.pipe == null)
      return;

    if (!(pipe.pipe instanceof IFluidSlotChange))
      return;
View Full Code Here

    TileEntity tile = world.getBlockTileEntity(x, y, z);
    if (!(tile instanceof TileGenericPipe))
      return null;

    TileGenericPipe pipe = (TileGenericPipe) tile;

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

    switch (ID) {
View Full Code Here

    TileEntity tile = world.getBlockTileEntity(x, y, z);
    if (!(tile instanceof TileGenericPipe))
      return null;

    TileGenericPipe pipe = (TileGenericPipe) tile;

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

    switch (ID) {
View Full Code Here

    }
    if (!(tile instanceof TileGenericPipe)) {
      return false;
    }

    TileGenericPipe tilePipe = (TileGenericPipe) tile;

    if (!BlockGenericPipe.isFullyDefined(tilePipe.pipe)) {
      return false;
    }
View Full Code Here

    if (signalStrength[wire.ordinal()] > 1) {
      for (ForgeDirection o : ForgeDirection.VALID_DIRECTIONS) {
        TileEntity tile = container.getTile(o);
        if (tile instanceof TileGenericPipe) {
          TileGenericPipe tilePipe = (TileGenericPipe) tile;

          if (BlockGenericPipe.isFullyDefined(tilePipe.pipe) && tilePipe.pipe.wireSet[wire.ordinal()]) {
            if (isWireConnectedTo(tile, wire)) {
              ((PipeClassReceiveSignal)tilePipe.pipe).receiveSignal(signalStrength[wire.ordinal()] - 1, wire);
            }
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.