From 0857a80ca8c461f136c965214847bb407cc1adf8 Mon Sep 17 00:00:00 2001 From: Alexander Xia Date: Mon, 4 Apr 2016 13:13:18 +0800 Subject: [PATCH] Tweaked Skull Texture Load --- Common/customskinloader/CustomSkinLoader.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Common/customskinloader/CustomSkinLoader.java b/Common/customskinloader/CustomSkinLoader.java index cfbb2d6..d0e642c 100644 --- a/Common/customskinloader/CustomSkinLoader.java +++ b/Common/customskinloader/CustomSkinLoader.java @@ -10,6 +10,7 @@ import java.util.Map; import org.apache.commons.io.IOUtils; +import com.google.common.collect.Maps; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mojang.authlib.minecraft.MinecraftProfileTexture; @@ -68,7 +69,7 @@ public class CustomSkinLoader { for(int i=0;i loadProfileFromCache(String username) { + public static Map loadProfileFromCache(final String username) { if(profileCache.containsKey(username)){ UserProfile profile=profileCache.get(username); return ModelManager0.fromUserProfile(profile); } - return loadProfile(username,(Map)null); + profileCache.put(username, null); + Thread loadThread=new Thread(){ + public void run(){ + loadProfile(username,(UserProfile)null);//Load in thread + } + }; + loadThread.setName(username+"'s skull"); + loadThread.start(); + return Maps.newHashMap(); } private static Logger initLogger() {