Interface UpgradeComputer.UpgradeCallback<T>

Type Parameters:
T - the value type matching the owning computer
Enclosing class:
UpgradeComputer<T>

public static interface UpgradeComputer.UpgradeCallback<T>
Listener interface notified whenever the UpgradeComputer's current value changes due to modifier addition or removal.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called after the computed value changes.
  • Method Details

    • run

      void run(T newValue, UpgradeComputer.CallbackReason reason)
      Called after the computed value changes.
      Parameters:
      newValue - the recomputed current value
      reason - whether modifiers were added or removed