Fix rendering lag when skull's username is empty. (#324)

This commit is contained in:
ZekerZhayard authored and GitHub committed 2025-01-12 00:10:00 +08:00
1 parent 4d0ebcc1f7
commit 8080aa7ab5
8 files changed
+19 -6

No files matched your search

@@ -123,7 +123,8 @@ public class DynamicSkullManager {
MinecraftProfileTexture skin = textures.get(MinecraftProfileTexture.Type.SKIN);
String skinUrl = skin.getUrl();
if (!HttpUtil0.isLocal(skinUrl))
return textures;
// Wrap MinecraftProfileTexture to FakeMinecraftProfileTexture
return ModelManager0.fromUserProfile(ModelManager0.toUserProfile(textures));
File skinFile = new File(CustomSkinLoader.DATA_DIR, skinUrl);
if (!skinFile.isFile())
return Maps.newHashMap();