use of com.lilithsthrone.utils.InventoryClothingComparator in project liliths-throne-public by Innoxia.
the class CharacterInventory method recalculateMapOfDuplicateClothing.
private void recalculateMapOfDuplicateClothing() {
clothingDuplicates.clear();
clothingInInventory.sort(new InventoryClothingComparator());
for (AbstractClothing clothing : clothingInInventory) {
if (!clothingDuplicates.containsKey(clothing))
clothingDuplicates.put(clothing, 1);
else
clothingDuplicates.put(clothing, clothingDuplicates.get(clothing) + 1);
}
}
Aggregations