Examples of useEnergy()


Examples of buildcraft.api.power.IPowerProvider.useEnergy()

        int mjRequired = energyRequired / energyPerMJ;
        if (mjRequired <= 0) break bcpower;
       
        pp.update(this);
       
        if(pp.useEnergy(0, mjRequired, false) > 0)
        {
          int mjGained = (int)(pp.useEnergy(0, mjRequired, true) * energyPerMJ);
          _energyStored += mjGained;
          energyRequired -= mjGained;
        }
View Full Code Here

Examples of buildcraft.api.power.IPowerProvider.useEnergy()

       
        pp.update(this);
       
        if(pp.useEnergy(0, mjRequired, false) > 0)
        {
          int mjGained = (int)(pp.useEnergy(0, mjRequired, true) * energyPerMJ);
          _energyStored += mjGained;
          energyRequired -= mjGained;
        }
      }
     
View Full Code Here

Examples of buildcraft.core.RFBattery.useEnergy()

    /**
     * After 100 cycles with no consumption or additional power, start to
     * slowly to decrease the amount of power available in the builder.
     */
    if (rfUnchangedCycles > 100) {
      battery.useEnergy(0, 1000, false);

      rfPrev = battery.getEnergyStored();
    }
  }

View Full Code Here

Examples of logisticspipes.pipes.PipeItemsRemoteOrdererLogistics.useEnergy()

    if(pipe != null) {
      if(MainProxy.isServer(par3EntityPlayer.worldObj)) {
        int energyUse = 0;
        if(pipe.getWorld() != par3EntityPlayer.worldObj) energyUse += 2500;
        energyUse += Math.sqrt(Math.pow(pipe.getX() - par3EntityPlayer.posX, 2) + Math.pow(pipe.getY() - par3EntityPlayer.posY, 2) + Math.pow(pipe.getZ() - par3EntityPlayer.posZ, 2));
        if(pipe.useEnergy(energyUse)) {
          MainProxy.sendPacketToPlayer(PacketHandler.getPacket(RequestPipeDimension.class).setInteger(MainProxy.getDimensionForWorld(pipe.getWorld())), par3EntityPlayer);
          par3EntityPlayer.openGui(LogisticsPipes.instance, GuiIDs.GUI_Normal_Orderer_ID, pipe.getWorld(), pipe.getX(), pipe.getY(), pipe.getZ());
         
        }
      }
View Full Code Here

Examples of logisticspipes.pipes.basic.CoreRoutedPipe.useEnergy()

        TileEntity tile = pos.getTileEntity(getWorldObj());
        if(!(tile instanceof LogisticsTileGenericPipe)) continue;
        LogisticsTileGenericPipe tPipe = (LogisticsTileGenericPipe) tile;
        if(!(tPipe.pipe instanceof CoreRoutedPipe)) continue;
        CoreRoutedPipe pipe = (CoreRoutedPipe) tPipe.pipe;
        if(pipe.useEnergy(50)) {
          heat += 5;
          if(heat > 100) {
            heat = 100;
          }
          updateHeat();
View Full Code Here

Examples of logisticspipes.pipes.basic.CoreRoutedPipe.useEnergy()

        TileEntity tile = pos.getTileEntity(getWorldObj());
        if(!(tile instanceof LogisticsTileGenericPipe)) continue;
        LogisticsTileGenericPipe tPipe = (LogisticsTileGenericPipe) tile;
        if(!(tPipe.pipe instanceof CoreRoutedPipe)) continue;
        CoreRoutedPipe pipe = (CoreRoutedPipe) tPipe.pipe;
        if(pipe.useEnergy(30)) {
          progress += 3;
        } else if(pipe.useEnergy(20)) {
          progress += 2;
        } else if(pipe.useEnergy(10)) {
          progress += 1;
View Full Code Here

Examples of logisticspipes.pipes.basic.CoreRoutedPipe.useEnergy()

        LogisticsTileGenericPipe tPipe = (LogisticsTileGenericPipe) tile;
        if(!(tPipe.pipe instanceof CoreRoutedPipe)) continue;
        CoreRoutedPipe pipe = (CoreRoutedPipe) tPipe.pipe;
        if(pipe.useEnergy(30)) {
          progress += 3;
        } else if(pipe.useEnergy(20)) {
          progress += 2;
        } else if(pipe.useEnergy(10)) {
          progress += 1;
        }
        if(progress >= 100) {
View Full Code Here

Examples of logisticspipes.pipes.basic.CoreRoutedPipe.useEnergy()

        CoreRoutedPipe pipe = (CoreRoutedPipe) tPipe.pipe;
        if(pipe.useEnergy(30)) {
          progress += 3;
        } else if(pipe.useEnergy(20)) {
          progress += 2;
        } else if(pipe.useEnergy(10)) {
          progress += 1;
        }
        if(progress >= 100) {
          if(tryCraft()) {
            progress = 0;
View Full Code Here

Examples of logisticspipes.pipes.basic.CoreRoutedPipe.useEnergy()

        continue;
      }
    }
    if(result.getValue1() != null) {
      CoreRoutedPipe pipe = SimpleServiceLocator.routerManager.getRouterUnsafe(result.getValue1(),false).getPipe();
      pipe.useEnergy(result.getValue2().energyUse);
      pipe.spawnParticle(Particles.BlueParticle, 10);
    }
    return result;
  }
 
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.