Class LoadoutItem

java.lang.Object
dev.twilite.game.loadout.LoadoutItem
Direct Known Subclasses:
RunePouchLoadoutItem

public class LoadoutItem extends Object
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
    Modifier and Type
    Class
    Description
    static class 
    Builder for LoadoutItem.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the amount withdrawn from the bank.
    Returns matching banked items.
    int
    Returns the amount currently banked.
    int[]
    Returns item ids accepted while checking bank contents.
    Returns the first matching banked item.
    boolean
    Returns whether this entry is present in the bank with its minimum amount.
    Returns matching carried inventory items.
    carried(boolean forceInventoryInterface)
    Returns matching carried inventory items.
    int
    Returns the amount currently carried.
    int
    Returns 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.
    int
    Returns the missing amount relative to inventory.
    boolean
    Returns whether this entry is present in the inventory with its minimum amount.
    int
    id()
    Returns the preferred item id.
    int[]
    ids()
    Returns accepted item ids for this loadout entry.
    int
    Returns the amount required for validation.
    boolean
    Returns whether this item should be withdrawn noted.
    of(int... ids)
    Creates an item builder for the supplied accepted item ids.
    Returns the equipment slot this item belongs to, when this is an equipment entry.
    boolean
    Returns whether matching stacks should be counted by stack size.
    Returns matching worn items.
    int
    Returns the amount currently worn.
    boolean
    Returns whether this entry is present in equipment with its minimum amount.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • of

      public static LoadoutItem.Builder of(int... ids)
      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

      public Optional<EquipmentSlot> slot()
      Returns the equipment slot this item belongs to, when this is an equipment entry.
    • carried

      public ItemView carried(boolean forceInventoryInterface)
      Returns matching carried inventory items.
    • carried

      public ItemView carried()
      Returns matching carried inventory items.
    • worn

      public ItemView worn()
      Returns matching worn items.
    • banked

      public ItemView 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

      public Optional<Item> carriedItem(boolean forceInventoryInterface)
      Returns the first matching carried item.
    • carriedItem

      public Optional<Item> carriedItem()
      Returns the first matching carried item.
    • bankedItem

      public Optional<Item> bankedItem()
      Returns the first matching banked item.