Class ConsumableSelectionOrder
java.lang.Object
privbot.query.ConsumableSelectionOrder
Stable ordering for inventory consumables when multiple slots match (e.g. several
same-tier potions). Prefer finishing nearly-empty vials before full ones.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Comparator<PrivItem> Prefer lowest dose tier (1 sip left) first, then earlier inventory slots for the same tier so one vial is drained via repeated ticks instead of one sip per matching item id.static intpotionDoseTierFromName(String itemName) Parses dose from potion-style display names using the last(n)group (e.g.
-
Method Details
-
potionDoseTierFromName
Parses dose from potion-style display names using the last(n)group (e.g.Xeric's aid (+)(4)→ 4). Items without a dose marker return5so they sort after explicit (1)–(4) tiers. A null or empty name returns9. -
lowestPotionDoseThenLowestSlot
Prefer lowest dose tier (1 sip left) first, then earlier inventory slots for the same tier so one vial is drained via repeated ticks instead of one sip per matching item id.
-