Examples of MENetworkPowerStorage


Examples of appeng.api.networkevents.MENetworkPowerStorage

    boolean newRedstone = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord) || worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord + 1, zCoord);
    if (newRedstone != redstonePowered && grid != null)
    {
      if (energy > 0.001D)
      {
        getGrid().postEvent(new MENetworkPowerStorage(this, MENetworkPowerStorage.PowerEventType.PROVIDE_POWER));
      } else if (energy < maxEnergy)
      {
        getGrid().postEvent(new MENetworkPowerStorage(this, MENetworkPowerStorage.PowerEventType.REQUEST_POWER));
      }
    }
    redstonePowered = newRedstone;
  }
View Full Code Here

Examples of appeng.api.networkevents.MENetworkPowerStorage

      return overheadPower;
    }

    if (wasEmpty && energy > 0.001D)
    {
      getGrid().postEvent(new MENetworkPowerStorage(this, MENetworkPowerStorage.PowerEventType.PROVIDE_POWER));
    }

    onUpdatePower();
    return 0.0D;
  }
View Full Code Here

Examples of appeng.api.networkevents.MENetworkPowerStorage

      energy = 0.0D;
    }

    if (energy < maxEnergy && wasFull)
    {
      getGrid().postEvent(new MENetworkPowerStorage(this, MENetworkPowerStorage.PowerEventType.REQUEST_POWER));
    }
    onUpdatePower();
    return amt;
  }
View Full Code Here

Examples of appeng.api.networking.events.MENetworkPowerStorage

      return 0;
    }

    if ( internalCurrentPower < 0.01 && amt > 0.01 )
      gridProxy.getNode().getGrid().postEvent( new MENetworkPowerStorage( this, PowerEventType.PROVIDE_POWER ) );

    internalCurrentPower += amt;
    if ( internalCurrentPower > internalMaxPower )
    {
      amt = internalCurrentPower - internalMaxPower;
View Full Code Here

Examples of appeng.api.networking.events.MENetworkPowerStorage

    if ( wasFull && amt > 0.001 )
    {
      try
      {
        gridProxy.getGrid().postEvent( new MENetworkPowerStorage( this, PowerEventType.REQUEST_POWER ) );
      }
      catch (GridAccessException ignored)
      {

      }
View Full Code Here

Examples of appeng.api.networking.events.MENetworkPowerStorage

  @Override
  protected void PowerEvent(PowerEventType x)
  {
    try
    {
      gridProxy.getGrid().postEvent( new MENetworkPowerStorage( this, x ) );
    }
    catch (GridAccessException e)
    {
      // not ready!
    }
View Full Code Here

Examples of appeng.api.networking.events.MENetworkPowerStorage

  {
    if ( x == PowerEventType.REQUEST_POWER )
    {
      try
      {
        gridProxy.getGrid().postEvent( new MENetworkPowerStorage( this, PowerEventType.REQUEST_POWER ) );
      }
      catch (GridAccessException e)
      {
        // :(
      }
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.