Package appeng.me.cache

Examples of appeng.me.cache.SpatialPylonCache


      IGrid gi = gridProxy.getGrid();
      IEnergyGrid energy = gridProxy.getEnergy();

      ISpatialStorageCell sc = (ISpatialStorageCell) cell.getItem();

      SpatialPylonCache spc = gi.getCache( ISpatialCache.class );
      if ( spc.hasRegion() && spc.isValidRegion() )
      {
        double req = spc.requiredPower();
        double pr = energy.extractAEPower( req, Actionable.SIMULATE, PowerMultiplier.CONFIG );
        if ( Math.abs( pr - req ) < req * 0.001 )
        {
          MENetworkEvent res = gi.postEvent( new MENetworkSpatialEvent( this, req ) );
          if ( !res.isCanceled() )
          {
            TransitionResult tr = sc.doSpatialTransition( cell, worldObj, spc.getMin(), spc.getMax(), true );
            if ( tr.success )
            {
              energy.extractAEPower( req, Actionable.MODULATE, PowerMultiplier.CONFIG );
              setInventorySlotContents( 0, null );
              setInventorySlotContents( 1, cell );
View Full Code Here

TOP

Related Classes of appeng.me.cache.SpatialPylonCache

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.