Package appeng.api.parts

Examples of appeng.api.parts.IPart


    if(te instanceof IGridProxyable) {
      AENetworkProxy proxy = ((IGridProxyable) te).getProxy();
      return proxy != null && proxy.getConnectableSides().contains(dir.getOpposite());
    } else if(te instanceof IPartHost) {
      IPart part = ((IPartHost) te).getPart(dir.getOpposite());
      if(part == null) {
        part = ((IPartHost) te).getPart(ForgeDirection.UNKNOWN);
        return part != null;
      }
      return part.getExternalFacingNode() != null;
    } else if(te instanceof IGridHost) {
      return !(te instanceof TileConduitBundle) && ((IGridHost) te).getCableConnectionType(dir.getOpposite()) != AECableType.NONE;
    }
    return false;
  }
View Full Code Here


      IPartItem bi = (IPartItem) is.getItem();

      is = is.copy();
      is.stackSize = 1;

      IPart bp = bi.createPartFromItemStack( is );
      if ( !(side == null || side == ForgeDirection.UNKNOWN || tile() == null) )
      {
        List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
        IPartCollisionHelper bch = new BusCollisionHelper( boxes, side, null, true );
        bp.getBoxes( bch );
        for (AxisAlignedBB bb : boxes)
        {
          if ( !tile().canAddPart( new NormallyOccludedPart( new Cuboid6( bb ) ) ) )
          {
            return false;
View Full Code Here

      BusCollisionHelper bch = new BusCollisionHelper( boxes, ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH, null, true );

      for (ForgeDirection whichSide : ForgeDirection.values())
      {
        IPart fPart = getPart( whichSide );

        if ( fPart != null )
          fPart.getBoxes( bch );
      }

      AxisAlignedBB b = null;
      AxisAlignedBB pb = Platform.getPrimaryBox( dir, 2 );
View Full Code Here

    {
      IPartHost host = (IPartHost) object;

      for (ForgeDirection side : ForgeDirection.values())
      {
        IPart p = host.getPart( side );
        IIcon ico = getIcon( p );

        if ( ico == null )
          continue;
View Full Code Here

    {
      IPartHost host = (IPartHost) object;

      for (ForgeDirection side : ForgeDirection.values())
      {
        IPart p = host.getPart( side );
        IIcon ico = getIcon( p );

        if ( ico == null )
          continue;
View Full Code Here

  {
    TileEntity ne = world.getTileEntity( x + d.offsetX, y + d.offsetY, z + d.offsetZ );
    if ( ne instanceof IGridHost && ne instanceof IPartHost )
    {
      IPartHost ph = (IPartHost) ne;
      IPart pcx = ph.getPart( ForgeDirection.UNKNOWN );
      if ( pcx instanceof PartCable )
      {
        PartCable pc = (PartCable) pcx;
        if ( pc.isConnected( d.getOpposite() ) )
        {
View Full Code Here

  private boolean isTransitionPlane(TileEntity blockTileEntity, ForgeDirection side)
  {
    if ( blockTileEntity instanceof IPartHost )
    {
      IPart p = ((IPartHost) blockTileEntity).getPart( side );
      return p instanceof PartFormationPlane;
    }
    return false;
  }
View Full Code Here

    boolean hasBuses = false;
    IPartHost ph = getHost();
    for (ForgeDirection of : EnumSet.complementOf( connections ))
    {
      IPart bp = ph.getPart( of );
      if ( bp instanceof IGridHost )
      {
        if ( of != ForgeDirection.UNKNOWN )
        {
          sides.add( of );
          hasBuses = true;
        }

        int len = bp.cableConnectionRenderTo();
        if ( len < 8 )
        {
          switch (of)
          {
          case DOWN:
View Full Code Here

    boolean hasBuses = false;
    IPartHost ph = getHost();
    for (ForgeDirection of : EnumSet.complementOf( connections ))
    {
      IPart bp = ph.getPart( of );
      if ( bp instanceof IGridHost )
      {
        if ( of != ForgeDirection.UNKNOWN )
        {
          sides.add( of );
          hasBuses = true;
        }

        int len = bp.cableConnectionRenderTo();
        if ( len < 8 )
        {
          switch (of)
          {
          case DOWN:
View Full Code Here

      else
        outputMsg( player, "Not Networked Block" );

      if ( te instanceof IPartHost )
      {
        IPart center = ((IPartHost) te).getPart( ForgeDirection.UNKNOWN );
        ((IPartHost) te).markForUpdate();
        if ( center != null )
        {
          GridNode n = (GridNode) center.getGridNode();
          outputMsg( player, "Node Channels: " + n.usedChannels() );
          for (IGridConnection gc : n.getConnections())
          {
            ForgeDirection fd = gc.getDirection( n );
            if ( fd != ForgeDirection.UNKNOWN )
View Full Code Here

TOP

Related Classes of appeng.api.parts.IPart

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.