Sfoglia il codice sorgente

Merge pull request #6437 from LuoYun-Team/Skin

fix:可能在获取正版皮肤时失败
龙腾猫跃 1 anno fa
parent
commit
6c426b09cc

+ 2 - 2
Plain Craft Launcher 2/Modules/Minecraft/ModMinecraft.vb

@@ -1596,7 +1596,7 @@ OnLoaded:
         Try
         Try
             For Each SkinProperty In GetJson(SkinString)("properties")
             For Each SkinProperty In GetJson(SkinString)("properties")
                 If SkinProperty("name") = "textures" Then
                 If SkinProperty("name") = "textures" Then
-                    SkinValue = SkinProperty("value").Replace("http:", "https:")
+                    SkinValue = SkinProperty("value")
                     Exit Try
                     Exit Try
                 End If
                 End If
             Next
             Next
@@ -1610,7 +1610,7 @@ OnLoaded:
         If SkinJson("textures") Is Nothing OrElse SkinJson("textures")("skin") Is Nothing OrElse SkinJson("textures")("skin")("url") Is Nothing Then
         If SkinJson("textures") Is Nothing OrElse SkinJson("textures")("skin") Is Nothing OrElse SkinJson("textures")("skin")("url") Is Nothing Then
             Throw New Exception("用户未设置自定义皮肤")
             Throw New Exception("用户未设置自定义皮肤")
         Else
         Else
-            SkinValue = SkinJson("textures")("skin")("url").ToString
+            SkinValue = SkinJson("textures")("skin")("url").ToString.Replace("http:", "https:")
         End If
         End If
         '保存缓存
         '保存缓存
         WriteIni(PathTemp & "Cache\Skin\Index" & Type & ".ini", Uuid, SkinValue)
         WriteIni(PathTemp & "Cache\Skin\Index" & Type & ".ini", Uuid, SkinValue)