Fix: MinecraftCapesAPI

This commit is contained in:
33 committed 2022-07-29 02:15:19 +08:00
1 parent 51aec265be
commit a3de21497d
3 files changed
+47 -31

No files matched your search

@@ -66,13 +66,13 @@ public class MinecraftCapesAPI implements JsonAPILoader.IJsonAPI {
}
String capeBase64 = result.textures.cape;
String hash = HttpTextureUtil.getHash(capeBase64);
byte[] capeBytes = Base64.decodeBase64(capeBase64);
String hash = HttpTextureUtil.getHash(capeBytes);
File cacheFile = HttpTextureUtil.getCacheFile(hash);
String fakeUrl = HttpTextureUtil.getBase64FakeUrl(hash);
//Save base64 image to cache file
try {
byte[] capeBytes = Base64.decodeBase64(capeBase64);
FileUtils.writeByteArrayToFile(cacheFile, capeBytes);
CustomSkinLoader.logger.info("Saved base64 image to " + cacheFile);
} catch (Exception e) {