samolego / FabricTailor

A server-side or singleplayer skin changing mod for fabric.
https://modrinth.com/mod/FabricTailor
GNU Lesser General Public License v3.0
109 stars 17 forks source link

[Suggestion] Don't cache default mojang skin #63

Open Kneelawk opened 2 years ago

Kneelawk commented 2 years ago

The Issue

While working on my Modfest: Singularity booth, I decided to update my Minecraft skin to more accurately represent how I wished to be perceived by those around me, as the disconnect was becoming uncomfortable. I uploaded my skin to the minecraft.net servers, waited a few minutes, and loaded up my game. However, when I logged into the Modfest server, I found that my skin was still set to my old, uncomfortable one.

After some fiddling with my launcher and discovering my skin rendered correctly in single-player and a local dedicated server, I figured a mod must have been caching my old player-skin server-side on the Modfest server. I had no idea what though, as this Modfest has 100+ submissions.

Eventually someone mentioned Fabric Tailor and I searched through the controls menu, found the keybind, and got my skin updated. But it gave me quite a scare.

The Suggested Fix

It might be helpful for those who don't know they have this mod installed to attempt to replicate default minecraft.net skin-loading behavior unless a player has explicitly selected a skin through Fabric Tailor.

This could be done by storing an extra enabled boolean along with each player's skin data that defaults to false if a player has no existing skin data, and that is set to true when the player sets a custom skin.

Kneelawk commented 2 years ago

I'll admit, I was close to just adding a mixin to my mod that would just forcefully set my player skin texture. Luckily someone mentioned Fabric Tailor and I got everything sorted out.

Kneelawk commented 2 years ago

This taught me that if a player loses control over how they present in game, it can be a pretty frightening experience for them.

samolego commented 2 years ago

This could be even easier; don't cache the skin if not set (by default current skin is cached), that way it will always load "fresh" one. Sounds like a doable request :), when I have time 😅 .

Kneelawk commented 2 years ago

Thanks for looking into this! :)