Class FoodProof

java.lang.Object
privbot.mechanics.FoodProof

public final class FoodProof extends Object
A bounded observation of one accepted food action, using a pre-send count and later detached inventory snapshots. No client reads or dispatch. The caller must ensure another action cannot consume, deposit or drop the same item during the window; a count drop proves the item left, not by itself which action caused it. Single-owner.
  • Method Details

    • begin

      public static FoodProof begin(int sentTick, int itemId, ItemContainerSnapshot before)
      A readable pre-send inventory containing this item is required; null means no baseline can be established.
    • observe

      public FoodProof.State observe(int tick, ItemContainerSnapshot inventory)
      A later observed drop proves the count changed. Timeout is not a refusal or proof the food was not eaten.