Examples of injectAEPower()


Examples of appeng.api.implementations.items.IAEItemPowerStorage.injectAEPower()

      IAEItemPowerStorage ps = (IAEItemPowerStorage) myItem.getItem();
      if ( ps.getAEMaxPower( myItem ) > ps.getAECurrentPower( myItem ) )
      {
        double oldPower = internalCurrentPower;

        double adjustment = ps.injectAEPower( myItem, extractAEPower( 150.0, Actionable.MODULATE, PowerMultiplier.CONFIG ) );
        internalCurrentPower += adjustment;
        if ( oldPower > internalCurrentPower )
          requiresUpdate = true;
        tickTickTimer = 20; // keep ticking...
      }
View Full Code Here

Examples of appeng.api.networking.energy.IAEPowerStorage.injectAEPower()

    {
      Iterator<IAEPowerStorage> it = requesters.iterator();
      while (amt > 0 && it.hasNext())
      {
        IAEPowerStorage node = it.next();
        amt = node.injectAEPower( amt, Actionable.SIMULATE );
      }

      Iterator<IEnergyGridProvider> i = energyGridProviders.iterator();
      while (amt > 0 && i.hasNext())
        amt = i.next().injectAEPower( amt, mode, seen );
View Full Code Here

Examples of appeng.api.networking.energy.IAEPowerStorage.injectAEPower()

      while (amt > 0 && !requesters.isEmpty())
      {
        IAEPowerStorage node = getFirstRequester();

        amt = node.injectAEPower( amt, Actionable.MODULATE );
        if ( amt > 0 )
        {
          requesters.remove( node );
          lastRequester = null;
        }
View Full Code Here

Examples of appeng.api.networking.energy.IEnergyGrid.injectAEPower()

    try
    {
      IEnergyGrid eg = proxy.getEnergy();
      if ( !seen.contains( eg ) )
        return eg.injectAEPower( amt, mode, seen );
    }
    catch (GridAccessException e)
    {
      // :P
    }
View Full Code Here

Examples of appeng.api.networking.energy.IEnergyGrid.injectAEPower()

    try
    {
      IEnergyGrid eg = outerProxy.getEnergy();
      if ( !seen.contains( eg ) )
        return eg.injectAEPower( amt, mode, seen );
    }
    catch (GridAccessException e)
    {
      // :P
    }
View Full Code Here

Examples of appeng.api.networking.energy.IEnergyGridProvider.injectAEPower()

      {
        IEnergyGridProvider what = i.next();
        Set<IEnergyGrid> listCopy = new HashSet<IEnergyGrid>();
        listCopy.addAll( seen );

        double cannotHold = what.injectAEPower( amt, Actionable.SIMULATE, listCopy );
        what.injectAEPower( amt - cannotHold, mode, seen );

        amt = cannotHold;
      }
View Full Code Here

Examples of appeng.api.networking.energy.IEnergyGridProvider.injectAEPower()

        IEnergyGridProvider what = i.next();
        Set<IEnergyGrid> listCopy = new HashSet<IEnergyGrid>();
        listCopy.addAll( seen );

        double cannotHold = what.injectAEPower( amt, Actionable.SIMULATE, listCopy );
        what.injectAEPower( amt - cannotHold, mode, seen );

        amt = cannotHold;
      }

      extra = amt;
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.