Class BackpackLoadout
java.lang.Object
org.rspeer.game.config.item.loadout.BackpackLoadout
- All Implemented Interfaces:
Cloneable, Iterable<ItemEntry>, InventoryLoadout
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds anItemEntryto the loadoutvoidadd(BackpackLoadout other) Appends a loadout to this loadoutvoidadd(EquipmentLoadout other) Appends anEquipmentLoadoutto this loadout.static BackpackLoadoutclone()intintgetName()intgetSlotCount(ItemEntry entry) iterator()voidsetEntries(Map<String, ItemEntry> entries) voidsetOutOfItemListener(Consumer<ItemEntry> outOfItemListener) booleanwithdraw()booleanMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface InventoryLoadout
applyProvidedSetup, getExcessBackpackEntries, getExcessEntries, getExcessEquipmentEntries, getExcessItems, getInvalidBackpackItems, getInvalidEquipmentItems, getInvalidItems, getInvalidItems, getIrrelevantItems, getMissing, getMissingBackpackEntries, getMissingBackpackEntries, getMissingEntries, getMissingEntries, getMissingEntries, getMissingEntries, getMissingEquipmentEntries, getMissingEquipmentEntries, getValidBackpackResults, getValidEquipmentResults, getValidResults, isBackpackValid, isBackpackValid, isBagged, isBagged, isEquipmentValid, isEquipmentValid, isInventoryValid, isInventoryValidMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
BackpackLoadout
-
-
Method Details
-
bagged
-
getActionsPerTick
public int getActionsPerTick() -
setEntries
-
withdraw
- Returns:
- Withdraws this loadout from the bank. Returns true if the full withdraw was completed, false if it failed or requires another tick to complete the full withdrawal. If an entry is unavailable and not optional, it will call the outOfItemListener. Will call the out of item listener if there are none left in the bank, regardless of if you have it in the inventory
- See Also:
-
withdraw
public boolean withdraw()- Specified by:
withdrawin interfaceInventoryLoadout
-
getAllocated
public int getAllocated() -
getSlotCount
-
getName
- Specified by:
getNamein interfaceInventoryLoadout- Returns:
- The name of this loadout
-
get
- Specified by:
getin interfaceInventoryLoadout- Returns:
- An
ItemEntrywith the given key
-
add
Description copied from interface:InventoryLoadoutAdds anItemEntryto the loadout- Specified by:
addin interfaceInventoryLoadout- Returns:
trueif an item was successfully added to the loadout
-
remove
- Specified by:
removein interfaceInventoryLoadout- Returns:
- The removed entry, or null if no ItemEntry matching the key was present
-
getOutOfItemListener
- Specified by:
getOutOfItemListenerin interfaceInventoryLoadout
-
setOutOfItemListener
- Specified by:
setOutOfItemListenerin interfaceInventoryLoadout
-
clone
- Specified by:
clonein interfaceInventoryLoadout
-
add
Appends a loadout to this loadout- Parameters:
other- The loadout to add
-
add
Appends anEquipmentLoadoutto this loadout. Note that it will skip over items you have equipped already. If you don't want to skip these, then useadd(BackpackLoadout)withEquipmentLoadout.toBackpackLoadout(String)as the arg- Parameters:
other- The loadout to add
-
clone
- Specified by:
clonein interfaceInventoryLoadout
-
iterator
-