Package appeng.api.networking

Examples of appeng.api.networking.IGrid


        {
          IGridNode node = ((IGridHost) monitorable).getGridNode( ForgeDirection.UNKNOWN );
          if ( node != null )
          {
            networkNode = node;
            IGrid g = node.getGrid();
            if ( g != null )
              powerSrc = new ChannelPowerSrc( networkNode, (IEnergyGrid) g.getCache( IEnergyGrid.class ) );
          }
        }
      }
      else
        isContainerValid = false;
View Full Code Here


        boolean requirePower = false;

        IGridNode gn = ((IActionHost) getTile()).getActionableNode();
        if ( gn != null )
        {
          IGrid g = gn.getGrid();
          if ( g != null )
          {
            if ( requirePower )
            {
              IEnergyGrid eg = g.getCache( IEnergyGrid.class );
              if ( !eg.isNetworkPowered() )
              {
                return false;
              }
            }

            ISecurityGrid sg = g.getCache( ISecurityGrid.class );
            if ( sg.hasPermission( player, requiredPermission ) )
              return true;
          }
        }
View Full Code Here

    if ( host != null )
    {
      IGridNode gn = host.getActionableNode();
      if ( gn != null )
      {
        IGrid g = gn.getGrid();
        if ( g != null )
        {
          if ( requirePower )
          {
            IEnergyGrid eg = g.getCache( IEnergyGrid.class );
            if ( !eg.isNetworkPowered() )
              return false;
          }

          ISecurityGrid sg = g.getCache( ISecurityGrid.class );
          if ( sg.hasPermission( invPlayer.player, perm ) )
            return true;
        }
      }
    }
View Full Code Here

  }

  @Override
  public boolean isActive()
  {
    IGrid g = getGrid();
    if ( g != null )
    {
      IPathingGrid pg = g.getCache( IPathingGrid.class );
      IEnergyGrid eg = g.getCache( IEnergyGrid.class );
      return meetsChannelRequirements() && eg.isNetworkPowered() && !pg.isNetworkBooting();
    }
    return false;
  }
View Full Code Here

   */
  public IGrid getGrid() throws GridAccessException
  {
    if ( node == null )
      throw new GridAccessException();
    IGrid grid = node.getGrid();
    if ( grid == null )
      throw new GridAccessException();
    return grid;
  }
View Full Code Here

    return grid;
  }

  public IEnergyGrid getEnergy() throws GridAccessException
  {
    IGrid grid = getGrid();
    if ( grid == null )
      throw new GridAccessException();
    IEnergyGrid eg = grid.getCache( IEnergyGrid.class );
    if ( eg == null )
      throw new GridAccessException();
    return eg;
  }
View Full Code Here

    return eg;
  }

  public IPathingGrid getPath() throws GridAccessException
  {
    IGrid grid = getGrid();
    if ( grid == null )
      throw new GridAccessException();
    IPathingGrid pg = grid.getCache( IPathingGrid.class );
    if ( pg == null )
      throw new GridAccessException();
    return pg;
  }
View Full Code Here

    return pg;
  }

  public ITickManager getTick() throws GridAccessException
  {
    IGrid grid = getGrid();
    if ( grid == null )
      throw new GridAccessException();
    ITickManager pg = grid.getCache( ITickManager.class );
    if ( pg == null )
      throw new GridAccessException();
    return pg;
  }
View Full Code Here

    return pg;
  }

  public IStorageGrid getStorage() throws GridAccessException
  {
    IGrid grid = getGrid();
    if ( grid == null )
      throw new GridAccessException();

    IStorageGrid pg = grid.getCache( IStorageGrid.class );

    if ( pg == null )
      throw new GridAccessException();

    return pg;
View Full Code Here

    return pg;
  }

  public P2PCache getP2P() throws GridAccessException
  {
    IGrid grid = getGrid();
    if ( grid == null )
      throw new GridAccessException();

    P2PCache pg = grid.getCache( P2PCache.class );

    if ( pg == null )
      throw new GridAccessException();

    return pg;
View Full Code Here

TOP

Related Classes of appeng.api.networking.IGrid

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.