@Override
  public void updateEntity() {
    super.updateEntity();
    if (redstonePower) return;
    if (worldObj.getWorldTime() % 20 == 0) isProcessing = canProcess();
    if (isProcessing) {
      this.lastItemValue = r.getEnergyValue();
      this.QEnergyItemBuffer = this.lastItemValue;

      if (processTime > 0) processTime--;

      this.QEnergyItemBuffer =
          (int) (((float) processTime / (float) r.getProcessTime()) * (float) this.lastItemValue);
      if (this.processTime == 0) process();

      if (this.processTime == -1) processTime = r.getProcessTime();

    } else {
      processTime = -1;
      QEnergyItemBuffer = 0;
    }

    if (updateNextTick) {
      // All nearby players need to be updated if the status of work
      // changes, or if heat runs out / starts up, in order to change
      // texture.
      updateNextTick = false;
      worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
    }
  }