Interface LoadoutBuilder


public interface LoadoutBuilder
A builder for creating Loadout configurations.

This interface provides a fluent API for constructing loadouts with specific items in inventory, equipment, and rune pouch slots. The builder supports:

  • Adding individual items with full configuration options
  • Adding multiple items at once
  • Convenience methods for common item types
  • Disabling specific sections of the loadout

Example usage:


 Loadout loadout = factory.newBuilder()
     .equipmentItem(ItemID.DRAGON_SCIMITAR, EquipmentInventorySlot.WEAPON.getSlotIdx())
     .inventoryItem(ItemID.SHARK, 10, 0)
     .inventoryItem(ItemID.SUPER_COMBAT_POTION4, 1, 10)
     .build();
 

See Also:
  • Method Details

    • getInventory

      LoadoutItem[] getInventory()
      Gets the current inventory items in the builder.
      Returns:
      an array of inventory LoadoutItems
    • getEquipment

      LoadoutItem[] getEquipment()
      Gets the current equipment items in the builder.
      Returns:
      an array of equipment LoadoutItems
    • getRunePouch

      LoadoutItem[] getRunePouch()
      Gets the current rune pouch items in the builder.
      Returns:
      an array of rune pouch LoadoutItems
    • item

      LoadoutBuilder item(int id, int quantity, boolean stackable, boolean noted, LoadoutItem.Type type, int slot)
      Adds an item with full configuration options.
      Parameters:
      id - the item ID
      quantity - the required quantity
      stackable - whether the item is stackable
      noted - whether the item should be noted
      type - the item type (inventory, equipment, or rune pouch)
      slot - the slot index within the container
      Returns:
      this builder for method chaining
    • item

      LoadoutBuilder item(int id, int quantity, int maxQuantity, boolean stackable, boolean noted, LoadoutItem.Type type, int slot)
      Adds an item with full configuration options including maximum quantity.
      Parameters:
      id - the item ID
      quantity - the minimum required quantity
      maxQuantity - the maximum quantity to withdraw
      stackable - whether the item is stackable
      noted - whether the item should be noted
      type - the item type (inventory, equipment, or rune pouch)
      slot - the slot index within the container
      Returns:
      this builder for method chaining
    • item

      Adds a pre-configured loadout item.
      Parameters:
      item - the loadout item to add
      Returns:
      this builder for method chaining
    • items

      LoadoutBuilder items(LoadoutItem... items)
      Adds multiple pre-configured loadout items.
      Parameters:
      items - the loadout items to add
      Returns:
      this builder for method chaining
    • items

      Adds a collection of pre-configured loadout items.
      Parameters:
      items - the collection of loadout items to add
      Returns:
      this builder for method chaining
    • item

      LoadoutBuilder item(int id, int quantity, boolean isStackable, LoadoutItem.Type type, int slot)
      Adds an item with stackable flag and no noted form.
      Parameters:
      id - the item ID
      quantity - the required quantity
      isStackable - whether the item is stackable
      type - the item type
      slot - the slot index
      Returns:
      this builder for method chaining
    • item

      LoadoutBuilder item(int id, int quantity, int maxQuantity, boolean isStackable, LoadoutItem.Type type, int slot)
      Adds an item with stackable flag, maximum quantity, and no noted form.
      Parameters:
      id - the item ID
      quantity - the minimum required quantity
      maxQuantity - the maximum quantity to withdraw
      isStackable - whether the item is stackable
      type - the item type
      slot - the slot index
      Returns:
      this builder for method chaining
    • item

      LoadoutBuilder item(int id, int quantity, LoadoutItem.Type type, int slot)
      Adds an item with quantity, assuming non-stackable and non-noted.
      Parameters:
      id - the item ID
      quantity - the required quantity
      type - the item type
      slot - the slot index
      Returns:
      this builder for method chaining
    • item

      LoadoutBuilder item(int id, int quantity, int maxQuantity, LoadoutItem.Type type, int slot)
      Adds an item with quantity range, assuming non-stackable and non-noted.
      Parameters:
      id - the item ID
      quantity - the minimum required quantity
      maxQuantity - the maximum quantity to withdraw
      type - the item type
      slot - the slot index
      Returns:
      this builder for method chaining
    • item

      LoadoutBuilder item(int id, LoadoutItem.Type type, int slot)
      Adds a single item (quantity 1) with default settings.
      Parameters:
      id - the item ID
      type - the item type
      slot - the slot index
      Returns:
      this builder for method chaining
    • item

      LoadoutBuilder item(int id, boolean isStackable, LoadoutItem.Type type, int slot)
      Adds a single item with stackable flag.
      Parameters:
      id - the item ID
      isStackable - whether the item is stackable
      type - the item type
      slot - the slot index
      Returns:
      this builder for method chaining
    • inventoryItem

      LoadoutBuilder inventoryItem(int id, int quantity, boolean isStackable, boolean isNoted, int slot)
      Adds an inventory item with full configuration.
      Parameters:
      id - the item ID
      quantity - the required quantity
      isStackable - whether the item is stackable
      isNoted - whether the item should be noted
      slot - the inventory slot (0-27)
      Returns:
      this builder for method chaining
    • inventoryItem

      LoadoutBuilder inventoryItem(int id, int quantity, int maxQuantity, boolean isStackable, boolean isNoted, int slot)
      Adds an inventory item with quantity range and full configuration.
      Parameters:
      id - the item ID
      quantity - the minimum required quantity
      maxQuantity - the maximum quantity to withdraw
      isStackable - whether the item is stackable
      isNoted - whether the item should be noted
      slot - the inventory slot (0-27)
      Returns:
      this builder for method chaining
    • inventoryItem

      LoadoutBuilder inventoryItem(int id, int quantity, boolean isStackable, int slot)
      Adds an inventory item with stackable flag.
      Parameters:
      id - the item ID
      quantity - the required quantity
      isStackable - whether the item is stackable
      slot - the inventory slot (0-27)
      Returns:
      this builder for method chaining
    • inventoryItem

      LoadoutBuilder inventoryItem(int id, int quantity, int maxQuantity, boolean isStackable, int slot)
      Adds an inventory item with quantity range and stackable flag.
      Parameters:
      id - the item ID
      quantity - the minimum required quantity
      maxQuantity - the maximum quantity to withdraw
      isStackable - whether the item is stackable
      slot - the inventory slot (0-27)
      Returns:
      this builder for method chaining
    • inventoryItem

      LoadoutBuilder inventoryItem(int id, int quantity, int slot)
      Adds an inventory item with default settings (non-stackable, non-noted).
      Parameters:
      id - the item ID
      quantity - the required quantity
      slot - the inventory slot (0-27)
      Returns:
      this builder for method chaining
    • inventoryItem

      LoadoutBuilder inventoryItem(int id, int quantity, int maxQuantity, int slot)
      Adds an inventory item with quantity range and default settings.
      Parameters:
      id - the item ID
      quantity - the minimum required quantity
      maxQuantity - the maximum quantity to withdraw
      slot - the inventory slot (0-27)
      Returns:
      this builder for method chaining
    • inventoryItem

      LoadoutBuilder inventoryItem(int id, int slot)
      Adds a single inventory item (quantity 1).
      Parameters:
      id - the item ID
      slot - the inventory slot (0-27)
      Returns:
      this builder for method chaining
    • equipmentItem

      LoadoutBuilder equipmentItem(int id, int quantity, boolean isStackable, int slot)
      Adds an equipment item with stackable flag.
      Parameters:
      id - the item ID
      quantity - the required quantity (for stackable equipment like arrows)
      isStackable - whether the item is stackable
      slot - the equipment slot index
      Returns:
      this builder for method chaining
    • equipmentItem

      LoadoutBuilder equipmentItem(int id, int quantity, int maxQuantity, boolean isStackable, int slot)
      Adds an equipment item with quantity range and stackable flag.
      Parameters:
      id - the item ID
      quantity - the minimum required quantity
      maxQuantity - the maximum quantity to withdraw
      isStackable - whether the item is stackable
      slot - the equipment slot index
      Returns:
      this builder for method chaining
    • equipmentItem

      LoadoutBuilder equipmentItem(int id, int quantity, int slot)
      Adds an equipment item with quantity.
      Parameters:
      id - the item ID
      quantity - the required quantity
      slot - the equipment slot index
      Returns:
      this builder for method chaining
    • equipmentItem

      LoadoutBuilder equipmentItem(int id, int quantity, int maxQuantity, int slot)
      Adds an equipment item with quantity range.
      Parameters:
      id - the item ID
      quantity - the minimum required quantity
      maxQuantity - the maximum quantity to withdraw
      slot - the equipment slot index
      Returns:
      this builder for method chaining
    • equipmentItem

      LoadoutBuilder equipmentItem(int id, int slot)
      Adds a single equipment item (quantity 1).
      Parameters:
      id - the item ID
      slot - the equipment slot index
      Returns:
      this builder for method chaining
    • runePouchItem

      LoadoutBuilder runePouchItem(int id, int quantity, int slot)
      Adds a rune to the rune pouch.
      Parameters:
      id - the rune item ID
      quantity - the required quantity
      slot - the rune pouch slot (0-3)
      Returns:
      this builder for method chaining
    • runePouchItem

      LoadoutBuilder runePouchItem(int id, int quantity, int maxQuantity, int slot)
      Adds a rune to the rune pouch with quantity range.
      Parameters:
      id - the rune item ID
      quantity - the minimum required quantity
      maxQuantity - the maximum quantity to store
      slot - the rune pouch slot (0-3)
      Returns:
      this builder for method chaining
    • disableInventory

      LoadoutBuilder disableInventory()
      Disables the inventory section of this loadout.

      When disabled, inventory items will not be checked or fetched when using this loadout.

      Returns:
      this builder for method chaining
    • disableEquipment

      LoadoutBuilder disableEquipment()
      Disables the equipment section of this loadout.

      When disabled, equipment items will not be checked or fetched when using this loadout.

      Returns:
      this builder for method chaining
    • disableRunePouch

      LoadoutBuilder disableRunePouch()
      Disables the rune pouch section of this loadout.

      When disabled, rune pouch items will not be checked or fetched when using this loadout.

      Returns:
      this builder for method chaining
    • build

      Loadout build()
      Builds and returns the configured loadout.
      Returns:
      the constructed Loadout