Skin glitched Black on 1.20.1
Artas9891 opened this issue ยท 1 comments
So it was fine until yesterday, but all of a sudden the skins are turned black somehow, I tried to use the setskin command in-game with the link but doesn't seem to work, made a new world and did setskin again didn't work, so I am sure it isn't something on my end. Is there something going on with imgur and the mod itself or is it because I updated the modpack which I use, or some other reason I guess.
So this is taken from the announcement I made on discord
Re:Skin for those who are having issues, I have found the fix for 1.20 for now. I will take a look at back porting the fix back to older versions
For those interested in the issue, imgur now re-directs browsers back to the main website unless the "Accept" header is set.
httpurlconnection.setRequestProperty("Accept", "image/png");
I wont have enough time tonight but if you want to compile a copy yourself with the fix, you can do it by downloading a copy of the version of the code you want the fix for. And setting it using the above line before the httpurlconnection.connect(); call.
Tbh, it's a flag I should have probably set anyway :Sweating: though most of the time it doesn't tend to effect the response. It is still a part of the typical http headers you'd send.
For now, whitelist https://reskinproxy.sekwah.com/ and just replace https://i.imgur.com/ at the start of your link with this. This will apply the header via my own server.
This workaround may take some time to deploy the ssl certs so please give it a bit after this announcement, I will be uploading the fix for the latest version for release now though so you should see these pop up on curseforge in the next few hours or days depending on how fast the CurseForge moderation team is, though may be instantly available for modrinth.
A fix should be released soon as I've flagged it to auto build right now though there is a workaround for older versions.
I will also pin this for visibility in case anyone is also looking to make issues.