Wurst7 icon indicating copy to clipboard operation
Wurst7 copied to clipboard

Alt Manager Skin Preview doesn't work

Open Hi-ImKyle opened this issue 5 years ago • 7 comments

Description

Alt Manager's skin preview doesn't work.

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to Alt Manager
  2. Click on an existing alt with a skin or
  3. Create new alt with a name with a skin
  4. Neither previews work.

(Optional) screenshots / videos

Preview of the alt list screen Preview of adding an alt

Versions

Please complete the following information:

  • Minecraft version: 1.16.1
  • Wurst version: 7.3

Crash report

N/A

Additional notes

  • Stealing the skin works just fine

Hi-ImKyle avatar Jul 19 '20 20:07 Hi-ImKyle

Found the culprit, this line uses the old Skin API whereas the skin stealer uses the new one.

Solution would just be to make the preview use the new system obviously but I've had no luck trying to implement that myself.

Hi-ImKyle avatar Jul 19 '20 22:07 Hi-ImKyle

  • Wurst Updated: 7.4

I have managed to get the preview working now on the alt manager screen, I think the add an alt screen shouldn't have the preview because of the way it fetches skins is via the name/email and in most cases a Minecraft account uses email which fails to resolve the username which then prevents the preview from working.

Still hoping for a proper reimplementation as my method is not exactly jank it's just not something I'd want users using as it breaks a few things.

Hi-ImKyle avatar Jul 23 '20 00:07 Hi-ImKyle

Still hoping for a proper reimplementation as my method is not exactly jank it's just not something I'd want users using as it breaks a few things.

Please post your method.

I can clean up your "not exactly jank it's just not something I'd want users using", no problem. I just need to see an example that works at all. I have tried so many things to get this working and every time it didn't.

Alexander01998 avatar Jul 24 '20 01:07 Alexander01998

Preview

Preview of Alt Manager Screen Preview of Adding an Alt (Imo the preview for adding an alt needs removing, works just only for usernames which no one should be logging in with anymore)

The main issue is that skins in-game are borked, and it can get worse than just showing default skins. I've had entire white skins before(possible reason below). Borked

Adding an alt is fairly laggy too, each character in the name or email box causes the skin to refresh which lags. Maybe delay the skin preview by X seconds as to let the user finish typing.

The reason I think the skins are entirely borked in-game is that the new method caches the skins just as the skin stealer would but with every skin it fetches for the alt manager. So when rendering a skin it hasn't seen it tries to get the cached version and fails. Hence why I said it breaks a few things.

Method

By no means is this method good, I consider myself a rather garbage Java programmer but please try and modify and get it working the best you can if possible.

Inside net.wurstclient.altmanager.screens.AltEditorScreen, getSkinUrl(), getTexturesValue(), getSessionJson() and getUUID() are now public static to expose the new skin API methods.

New Mixin called PlayerSkinTextureMixin, gist, add to the wurst.mxins.json etc.. Overrides the original PlayerSkinTexture.load() method to use the new API.

Sorry if the formatting is odd in the file, or I'm not following a formatting rule, I did intend on keeping the method to myself to encourage a better method to be created.

Hi-ImKyle avatar Jul 25 '20 00:07 Hi-ImKyle

I'm going to try and move things around and create a new class to get the skins instead of using a mixin later, that might fix the broken skins in-game.

Hi-ImKyle avatar Jul 25 '20 00:07 Hi-ImKyle

Created a pull request with fixes, tell me if anything needs changing. Skin preview should work just fine now and not break skins in-game as it did before, #159

Hi-ImKyle avatar Jul 25 '20 23:07 Hi-ImKyle

This issue has been open for a while with no recent activity. If this issue is still important to you, please add a comment within the next 7 days to keep it open. Otherwise, the issue will be automatically closed to free up time for other tasks.

Issues should be closed if:

  • They are duplicates of other issues
  • There is not enough demand
  • They are no longer relevant
  • There are not enough details

github-actions[bot] avatar Feb 09 '24 01:02 github-actions[bot]