use of riskyken.armourersWorkshop.api.common.skin.data.ISkinIdentifier in project Armourers-Workshop by RiskyKen.
the class ClientSkinCache method getModelCount.
public int getModelCount() {
int count = 0;
synchronized (skinIDMap) {
Object[] keySet = skinIDMap.getKeySet().toArray();
for (int i = 0; i < keySet.length; i++) {
ISkinIdentifier key = (ISkinIdentifier) keySet[i];
Skin skin = skinIDMap.getQuiet(key);
if (skin != null) {
count += skin.getModelCount();
}
}
}
return count;
}
use of riskyken.armourersWorkshop.api.common.skin.data.ISkinIdentifier in project Armourers-Workshop by RiskyKen.
the class ClientSkinCache method clearCache.
public void clearCache() {
synchronized (skinIDMap) {
Object[] keySet = skinIDMap.getKeySet().toArray();
for (int i = 0; i < keySet.length; i++) {
ISkinIdentifier key = (ISkinIdentifier) keySet[i];
Skin customArmourItemData = skinIDMap.get(key);
skinIDMap.remove(key);
customArmourItemData.cleanUpDisplayLists();
}
}
synchronized (requestedSkinIDs) {
requestedSkinIDs.clear();
}
}
Aggregations