mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-22 16:39:46 +00:00
Fix skull loading lag for Minecraft 1.13.2 or older version. (#91)
This commit is contained in:
1 parent
ad846f37a2
commit
fdceb08a2c
5 files changed
+61
-26
No files matched your search
@@ -166,12 +166,15 @@ public class CustomSkinLoader {
|
||||
UserProfile profile=profileCache.getProfile(credential);
|
||||
return ModelManager0.fromUserProfile(profile);
|
||||
}
|
||||
//profileCache.setLoading(username, true);
|
||||
Thread loadThread= new Thread(() -> {
|
||||
loadProfile0(gameProfile);//Load in thread
|
||||
});
|
||||
loadThread.setName(username + "'s skull");
|
||||
threadPool.execute(loadThread);
|
||||
if (!profileCache.isLoading(credential)) {
|
||||
profileCache.setLoading(credential, true);
|
||||
threadPool.execute(() -> {
|
||||
String tempName = Thread.currentThread().getName();
|
||||
Thread.currentThread().setName(username + "'s skull");
|
||||
loadProfile0(gameProfile);//Load in thread
|
||||
Thread.currentThread().setName(tempName);
|
||||
});
|
||||
}
|
||||
return Maps.newHashMap();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user