Package dev.twilite.game.facade
Class Bank
java.lang.Object
dev.twilite.game.facade.Bank
Bank accessors backed by the client's inventory data and interface components.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclose()Closes the bank interfacestatic booleancontains(int... ids) Checks if the bank contains any of the specified items.static booleancontainsAll(int... ids) Checks if the bank contains all of the specified items.static intcount(int... ids) Returns the total stack size of an item in the inventory.static voidDeposits an item selected from the bank-side inventory view.static voiddepositAll(Function<ItemView, ItemView> query) Deposits all matching bank-side inventory items, once per item id.static voidDeposits supported carried containers, such as the looting bag, with the bank deposit-containers button.static voidDeposits the full bank-side inventory with the bank deposit-inventory button.static voidDeposits all worn equipment with the bank deposit-equipment button.static ItemViewReturns a lazy view over items in the inventory (Bankside).static ItemViewitems()Returns a lazy view over items in the bank.static voidopen()Walks to and opens the nearest withdrawable bank.static voidopen(BankLocation location) Walks to and opens a specific bank location.static voidopen(BankLocation location, boolean force) Opens a specific bank location.static booleanshowing()Returns whether the Bank interface is currently visible.static voidWithdraws an item selected from the bank item view.static voidWithdraws an item selected from the bank item view using the requested note mode.static booleanReturns whether the bank is currently set to withdraw noted items.static voidwithdrawNote(boolean noted) Sets whether bank withdrawals should produce noted items.static intx()Returns the current X amount value
-
Constructor Details
-
Bank
public Bank()
-
-
Method Details
-
items
Returns a lazy view over items in the bank. -
inventory
Returns a lazy view over items in the inventory (Bankside). -
close
public static void close()Closes the bank interface -
showing
public static boolean showing()Returns whether the Bank interface is currently visible. -
count
public static int count(int... ids) Returns the total stack size of an item in the inventory.- Parameters:
ids- item ids, usually fromItemId
-
open
public static void open()Walks to and opens the nearest withdrawable bank. -
open
Walks to and opens a specific bank location. -
open
Opens a specific bank location.When
forceis true, the method walks toward the configured bank coordinate before falling back to nearby loaded bank entities. This avoids clicking a different local bank while a route-selected target is still far away.- Parameters:
location- bank location to useforce- whether to force movement towardlocationwhile it is distant
-
contains
public static boolean contains(int... ids) Checks if the bank contains any of the specified items.- Parameters:
ids- item ids to check, usually fromItemId- Returns:
trueif at least one of the specified items is in the bank, otherwisefalse
-
containsAll
public static boolean containsAll(int... ids) Checks if the bank contains all of the specified items.- Parameters:
ids- item ids to check, usually fromItemId- Returns:
trueif all of the specified items are in the bank, otherwisefalse
-
x
public static int x()Returns the current X amount value -
withdrawNote
public static boolean withdrawNote()Returns whether the bank is currently set to withdraw noted items. -
withdrawNote
public static void withdrawNote(boolean noted) Sets whether bank withdrawals should produce noted items. -
deposit
Deposits an item selected from the bank-side inventory view. The query is applied toinventory(), and amounts below1are treated as1. -
depositAll
Deposits all matching bank-side inventory items, once per item id. The query is applied toinventory(). -
withdraw
Withdraws an item selected from the bank item view. The query is applied toitems(), and amounts below1are treated as1. -
withdraw
Withdraws an item selected from the bank item view using the requested note mode. The query is applied toitems(), and amounts below1are treated as1. -
depositInventory
public static void depositInventory()Deposits the full bank-side inventory with the bank deposit-inventory button. -
depositWorn
public static void depositWorn()Deposits all worn equipment with the bank deposit-equipment button. -
depositContainers
public static void depositContainers()Deposits supported carried containers, such as the looting bag, with the bank deposit-containers button.
-