Exemplo n.º 1
0
  @Override
  public void detectAndSendChanges() {
    super.detectAndSendChanges();

    for (int i = 0; i < this.crafters.size(); ++i) {
      ICrafting crafter = (ICrafting) this.crafters.get(i);

      if (this.lastTankMeter != this.core.getTankMeter()) {
        crafter.sendProgressBarUpdate(this, 0, this.core.getTankMeter());
      }
      if (this.lastWorkMeter != this.core.getWorkMeter()) {
        crafter.sendProgressBarUpdate(this, 1, this.core.getWorkMeter());
      }
    }

    this.lastTankMeter = this.core.getTankMeter();
    this.lastWorkMeter = this.core.getWorkMeter();
  }
Exemplo n.º 2
0
 @Override
 public void addCraftingToCrafters(ICrafting crafting) {
   super.addCraftingToCrafters(crafting);
   crafting.sendProgressBarUpdate(this, 0, this.core.getTankMeter());
   crafting.sendProgressBarUpdate(this, 1, this.core.getWorkMeter());
 }