Examples of IGridBlock


Examples of appeng.api.networking.IGridBlock

        for (Class<? extends IGridHost> machineClass : network.getMachinesClasses())
        {
          IItemList<IAEItemStack> list = AEApi.instance().storage().createItemList();
          for (IGridNode machine : network.getMachines( machineClass ))
          {
            IGridBlock blk = machine.getGridBlock();
            ItemStack is = blk.getMachineRepresentation();
            if ( is != null && is.getItem() != null )
            {
              IAEItemStack ais = AEItemStack.create( is );
              ais.setStackSize( 1 );
              ais.setCountRequestable( (long) (blk.getIdlePowerUsage() * 100.0) );
              list.add( ais );
            }
          }

          for (IAEItemStack ais : list)
View Full Code Here

Examples of appeng.api.networking.IGridBlock

  @MENetworkEventSubscribe
  public void EnergyNodeChanges(MENetworkPowerIdleChange ev)
  {
    // update power usage based on event.
    GridNode node = (GridNode) ev.node;
    IGridBlock gb = node.getGridBlock();

    double newDraw = gb.getIdlePowerUsage();
    double diffDraw = newDraw - node.previousDraw;
    node.previousDraw = newDraw;

    drainPerTick += diffDraw;
  }
View Full Code Here

Examples of appeng.api.networking.IGridBlock

    if ( machine instanceof IEnergyGridProvider )
      energyGridProviders.add( (IEnergyGridProvider) machine );

    // idle draw...
    GridNode gridNode = (GridNode) node;
    IGridBlock gb = gridNode.getGridBlock();
    gridNode.previousDraw = gb.getIdlePowerUsage();
    drainPerTick += gridNode.previousDraw;

    // power storage
    if ( machine instanceof IAEPowerStorage )
    {
View Full Code Here

Examples of appeng.api.networking.IGridBlock

    for (IGridNode nodes : requireChannels)
    {
      if ( !semiOpen.contains( nodes ) )
      {
        IGridBlock gb = nodes.getGridBlock();
        EnumSet<GridFlags> flags = gb.getFlags();

        if ( flags.contains( GridFlags.COMPRESSED_CHANNEL ) && !blockDense.isEmpty() )
          return 9;

        depth++;
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.