Package dev.twilite.game.loadout
Class LoadoutItem
java.lang.Object
dev.twilite.game.loadout.LoadoutItem
- Direct Known Subclasses:
RunePouchLoadoutItem
Item-id based loadout entry.
The first id is the preferred withdrawal/equip id. Additional ids are accepted variants for validation, such as charged, degraded, ornamented, or trouver versions.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the amount withdrawn from the bank.banked()Returns matching banked items.intReturns the amount currently banked.int[]Returns item ids accepted while checking bank contents.Returns the first matching banked item.booleanReturns whether this entry is present in the bank with its minimum amount.carried()Returns matching carried inventory items.carried(boolean forceInventoryInterface) Returns matching carried inventory items.intReturns the amount currently carried.intReturns the excess amount relative to inventory.int[]Returns item ids accepted while checking carried inventory contents.Returns the first matching carried item.carriedItem(boolean forceInventoryInterface) Returns the first matching carried item.intReturns the missing amount relative to inventory.booleanReturns whether this entry is present in the inventory with its minimum amount.intid()Returns the preferred item id.int[]ids()Returns accepted item ids for this loadout entry.intminimum()Returns the amount required for validation.booleannoted()Returns whether this item should be withdrawn noted.static LoadoutItem.Builderof(int... ids) Creates an item builder for the supplied accepted item ids.slot()Returns the equipment slot this item belongs to, when this is an equipment entry.booleanReturns whether matching stacks should be counted by stack size.worn()Returns matching worn items.intReturns the amount currently worn.booleanReturns whether this entry is present in equipment with its minimum amount.
-
Method Details
-
of
Creates an item builder for the supplied accepted item ids. -
id
public int id()Returns the preferred item id. -
ids
public int[] ids()Returns accepted item ids for this loadout entry. -
carriedIds
public int[] carriedIds()Returns item ids accepted while checking carried inventory contents. -
bankedIds
public int[] bankedIds()Returns item ids accepted while checking bank contents. -
minimum
public int minimum()Returns the amount required for validation. -
amount
public int amount()Returns the amount withdrawn from the bank. -
stackable
public boolean stackable()Returns whether matching stacks should be counted by stack size. -
noted
public boolean noted()Returns whether this item should be withdrawn noted. -
slot
Returns the equipment slot this item belongs to, when this is an equipment entry. -
carried
Returns matching carried inventory items. -
carried
Returns matching carried inventory items. -
worn
Returns matching worn items. -
banked
Returns matching banked items. -
carriedAmount
public int carriedAmount()Returns the amount currently carried. -
wornAmount
public int wornAmount()Returns the amount currently worn. -
bankedAmount
public int bankedAmount()Returns the amount currently banked. -
carriedPresent
public boolean carriedPresent()Returns whether this entry is present in the inventory with its minimum amount. -
wornPresent
public boolean wornPresent()Returns whether this entry is present in equipment with its minimum amount. -
bankedPresent
public boolean bankedPresent()Returns whether this entry is present in the bank with its minimum amount. -
carriedMissing
public int carriedMissing()Returns the missing amount relative to inventory. -
carriedExcess
public int carriedExcess()Returns the excess amount relative to inventory. -
carriedItem
Returns the first matching carried item. -
carriedItem
Returns the first matching carried item. -
bankedItem
Returns the first matching banked item.
-