use of com.lilithsthrone.utils.InventoryItemComparator in project liliths-throne-public by Innoxia.
the class CharacterInventory method recalculateMapOfDuplicateItems.
private void recalculateMapOfDuplicateItems() {
itemDuplicates.clear();
itemsInInventory.sort(new InventoryItemComparator());
for (AbstractItem item : itemsInInventory) {
if (!itemDuplicates.containsKey(item))
itemDuplicates.put(item, 1);
else
itemDuplicates.put(item, itemDuplicates.get(item) + 1);
}
}
Aggregations