Example #1
0
  @Override
  public void detectAndSendChanges() {
    for (int var1 = 0; var1 < this.inventorySlots.size(); ++var1) {
      ItemStack var2 = ((Slot) this.inventorySlots.get(var1)).getStack();
      ItemStack var3 = (ItemStack) this.inventoryItemStacks.get(var1);

      if (!ItemStack.areItemStacksEqual(var3, var2)) {
        var3 = var2 == null ? null : var2.copy();
        this.inventoryItemStacks.set(var1, var3);

        for (int var4 = 0; var4 < this.crafters.size(); ++var4) {
          ((ICrafting) this.crafters.get(var4)).sendSlotContents(this, var1, var3);
        }
      }
    }
    for (int var1 = 0; var1 < this.crafters.size(); ++var1) {
      ICrafting var2 = (ICrafting) this.crafters.get(var1);
      if (this.soilamt != this.sluice.soilAmount) {
        var2.sendProgressBarUpdate(this, 0, this.sluice.soilAmount);
      }
      if (this.progress != this.sluice.processTimeRemaining) {
        var2.sendProgressBarUpdate(this, 1, this.sluice.processTimeRemaining);
      }
    }

    soilamt = this.sluice.soilAmount;
    progress = this.sluice.processTimeRemaining;
  }
  @Override
  public void detectAndSendChanges() {
    super.detectAndSendChanges();
    for (int i = 0; i < crafters.size(); i++) {
      ICrafting icrafting = (ICrafting) crafters.get(i);
      if (progress != logic.progress) {
        icrafting.sendProgressBarUpdate(this, 0, logic.progress);
      }
      if (fuel != logic.fuel) {
        icrafting.sendProgressBarUpdate(this, 1, logic.fuel);
      }
      if (fuelGague != logic.fuelGague) {
        icrafting.sendProgressBarUpdate(this, 2, logic.fuelGague);
      }
    }

    progress = logic.progress;
    fuel = logic.fuel;
    fuelGague = logic.fuelGague;
  }