Class ContainerSlot

java.lang.Object
privbot.hooks.container.ContainerSlot

public final class ContainerSlot extends Object
One occupied slot in a widget-backed item container.

Deliberately not a Widget. On Impact a container's items live in one flat array hanging off a single widget — there are no per-slot child widgets to hold — and a menu action against one is addressed by (item id, slot index, container widget id). This type mirrors that dispatch shape rather than the widget tree.

ShopSlot and BankSlot are the same shape and predate this class. They are left alone rather than migrated: both back working dispatch paths, and the value of a shared type here is in not adding a third copy, not in churning two that work.

  • Constructor Details

    • ContainerSlot

      public ContainerSlot(int containerWidgetId, int slotIndex, int itemId, String itemName, int quantity)
  • Method Details

    • containerWidgetId

      public int containerWidgetId()
      Owning widget — the param1 of an action against this slot.
    • slotIndex

      public int slotIndex()
      Position within the container — the param0.
    • itemId

      public int itemId()
      Item held here — the identifier.
    • itemName

      public String itemName()
      Display name, or null when the definition could not be resolved.
    • quantity

      public int quantity()
      Stack size in this slot.
    • toString

      public String toString()
      Overrides:
      toString in class Object