Package buildcraft.core

Examples of buildcraft.core.RFBattery


  @NetworkData
  private String currentRecipeId = "";

  public TileRefinery() {
    super();
    this.setBattery(new RFBattery(10000, 1500, 0));
  }
View Full Code Here


  private short powerAverage = 0;
  private final short[] power = new short[POWER_AVERAGING];

  public TileLaser() {
    super();
    this.setBattery(new RFBattery(10000, 250, 0));
  }
View Full Code Here

  boolean isDigging = true;

  public TileMiningWell() {
    super();
    this.setBattery(new RFBattery(10000, BuildCraftFactory.MINING_RF_COST_PER_BLOCK, 0));
  }
View Full Code Here

  private int rfPrev = 0;
  private int rfUnchangedCycles = 0;

  public TileAbstractBuilder() {
    super();
    this.setBattery(new RFBattery(FULL_CHEST_ENERGY, 1000, 0));
  }
View Full Code Here

  @Override
  public void updateEntity() {
    super.updateEntity();

    RFBattery battery = this.getBattery();

    if (rfPrev != battery.getEnergyStored()) {
      rfPrev = battery.getEnergyStored();
      rfUnchangedCycles = 0;
    }

    BuildingItem toRemove = null;

    for (BuildingItem i : buildersInAction) {
      i.update();

      if (i.isDone) {
        toRemove = i;
      }
    }

    if (toRemove != null) {
      buildersInAction.remove(toRemove);
    }

    if (rfPrev != battery.getEnergyStored()) {
      rfPrev = battery.getEnergyStored();
      rfUnchangedCycles = 0;
    }

    rfUnchangedCycles++;

    /**
     * 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

  protected int solidIconIndex = PipeIconProvider.TYPE.PipeAllEmerald_Solid.ordinal();

  public PipePowerEmerald(Item item) {
    super(item);
   
    battery = new RFBattery(2560 * 50, 2560, 0);
   
    transport.initFromPipe(this.getClass());
  }
View Full Code Here

  private int numFluidBlocksFound = 0;
  private boolean powered = false;

  public TilePump() {
    super();
    this.setBattery(new RFBattery(1000, 150, 0));
  }
View Full Code Here

  private PowerHandler powerHandler;

  public PipePowerWood(Item item) {
    super(new PipeTransportPower(), item);

    battery = new RFBattery(320 * 50, 320, 0);

    powerHandler = new PowerHandler(this, Type.PIPE);
    powerHandler.configure(0, 500, 1, 1500);
    powerHandler.setPerdition(new PerditionCalculator(PerditionCalculator.MIN_POWERLOSS));
    transport.initFromPipe(getClass());
View Full Code Here

    TileEnergyReceiver receiver;
  }

  public TileEnergyEmitter () {
    super();
    this.setBattery(new RFBattery(10240, 10240, 0));
  }
View Full Code Here

TOP

Related Classes of buildcraft.core.RFBattery

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.