Package appeng.me

Examples of appeng.me.GridConnection


  }

  @Override
  public void visitConnection(IGridConnection gcc)
  {
    GridConnection gc = (GridConnection) gcc;
    gc.setControllerRoute( null, true );
    gc.incrementChannelCount( usedChannels );
    gc.finalizeChannels();
  }
View Full Code Here


  }

  @Override
  public void visitConnection(IGridConnection gcc)
  {
    GridConnection gc = (GridConnection) gcc;
    gc.finalizeChannels();
  }
View Full Code Here

                IGridNode sn = sbp.getGridNode();
                if ( sn != null )
                {
                  try
                  {
                    new GridConnection( cn, sn, ForgeDirection.UNKNOWN );
                  }
                  catch (FailedConnection e)
                  {
                    // ekk!

                    bp.removeFromWorld();
                    setCenter( null );
                    return null;
                  }
                }
              }
            }
          }

          updateConnections();
          markForUpdate();
          markForSave();
          partChanged();
          return ForgeDirection.UNKNOWN;
        }
        else if ( bp != null && !(bp instanceof IPartCable) && side != ForgeDirection.UNKNOWN )
        {
          IPart cable = getPart( ForgeDirection.UNKNOWN );
          if ( cable != null && !bp.canBePlacedOn( ((IPartCable) cable).supportsBuses() ) )
            return null;

          setSide( side, bp );
          bp.setPartHostInfo( side, this, this.getTile() );

          if ( player != null )
            bp.onPlacement( player, is, side );

          if ( inWorld )
            bp.addToWorld();

          if ( getCenter() != null )
          {
            IGridNode cn = getCenter().getGridNode();
            IGridNode sn = bp.getGridNode();

            if ( cn != null && sn != null )
            {
              try
              {
                new GridConnection( cn, sn, ForgeDirection.UNKNOWN );
              }
              catch (FailedConnection e)
              {
                // ekk!
View Full Code Here

  }

  @Override
  public IGridConnection createGridConnection(IGridNode a, IGridNode b) throws FailedConnection
  {
    return new GridConnection( a, b, ForgeDirection.UNKNOWN );
  }
View Full Code Here

        for (IGridNode node : myGrid.getMachines( TileController.class ))
        {
          closedList.add( (IPathItem) node );
          for (IGridConnection gcc : node.getConnections())
          {
            GridConnection gc = (GridConnection) gcc;
            if ( !(gc.getOtherSide( node ).getMachine() instanceof TileController) )
            {
              List<IPathItem> open = new LinkedList<IPathItem>();
              closedList.add( gc );
              open.add( gc );
              gc.setControllerRoute( (GridNode) node, true );
              active.add( new PathSegment( this, open, semiOpen, closedList ) );
            }
          }
        }
      }
View Full Code Here

TOP

Related Classes of appeng.me.GridConnection

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.