Package appeng.api.networking

Examples of appeng.api.networking.IGridConnection


        if ( node == null )
          continue;

        boolean isValidConnection = this.canConnect( node, f ) && node.canConnect( this, f.getOpposite() );

        IGridConnection con = null; // find the connection for this
                      // direction..
        for (IGridConnection c : getConnections())
        {
          if ( c.getDirection( this ) == f )
          {
            con = c;
            break;
          }
        }

        if ( con != null )
        {
          IGridNode os = con.getOtherSide( this );
          if ( os == node )
          {
            // if this connection is no longer valid, destroy it.
            if ( !isValidConnection )
              con.destroy();
          }
          else
          {
            con.destroy();
            // throw new GridException( "invalid state found, encountered connection to phantom block." );
          }
        }
        else if ( isValidConnection )
        {
View Full Code Here


    {
      // not part of this network for real anymore.
      if ( Connections.size() == 1 )
        setGridStorage( null );

      IGridConnection c = Connections.listIterator().next();
      GridNode otherSide = (GridNode) c.getOtherSide( this );
      otherSide.getInternalGrid().pivot = otherSide;
      c.destroy();
    }

    if ( myGrid != null )
      myGrid.remove( this );
  }
View Full Code Here

TOP

Related Classes of appeng.api.networking.IGridConnection

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.