Class DrinkProof

java.lang.Object
privbot.mechanics.DrinkProof

public final class DrinkProof extends Object
Observes a potion-family dose total before and after an accepted drink. A lower total proves a dose left the inventory, not which action caused it; the caller must exclude simultaneous deposits, drops and other drinks of the same family. The name must end in a numeric dose, and an unknown inventory name makes the reading unreadable.
  • Method Details

    • begin

      public static DrinkProof begin(int tick, String potionName, ItemContainerSnapshot inventory)
      Returns null unless the selected potion and its complete readable dose baseline can be established.
    • observe

      public DrinkProof.State observe(int tick, ItemContainerSnapshot inventory)
      A later lower dose total is proof of a change; timeout never means the click was refused.