Examples of IGrid


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

Examples of appeng.api.networking.IGrid

        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

Examples of appeng.api.networking.IGrid

    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

Examples of appeng.api.networking.IGrid

  }

  @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

Examples of appeng.api.networking.IGrid

   */
  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

Examples of appeng.api.networking.IGrid

    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

Examples of appeng.api.networking.IGrid

    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

Examples of appeng.api.networking.IGrid

    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

Examples of appeng.api.networking.IGrid

    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

Examples of appeng.api.networking.IGrid

    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
Copyright © 2018 www.massapi.com. 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.