Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slim player skins render incorrectly #45

Open
Chi-Yu opened this issue Jun 19, 2020 · 1 comment
Open

Slim player skins render incorrectly #45

Chi-Yu opened this issue Jun 19, 2020 · 1 comment

Comments

@Chi-Yu
Copy link

Chi-Yu commented Jun 19, 2020

avatar.py doesn't currently support slim player skins which causes the wrong parts of the texture to be used to render player icons.

Example:
Player Skin

The API documentation states:

The "SKIN" object will have "metadata": {"model": "slim"} if the player model has slim arms. For square arms, "metadata" will be missing.

Seeing that there is currently only get_skin_url(), I'd say that avatar.py requires a tiny bit of refactoring to not only retrieve the URL but also "metadata" if present so create_av_from_skin() can use different image coordinates for slim skins.

@Chi-Yu
Copy link
Author

Chi-Yu commented Jul 4, 2020

Here is my attempt at adding this feature.

This branch also (hopefully?) fixes some of the arm and leg textures apparently using the wrong coordinates. I used the updated reference textures from the Minecraft wiki.

Since I'm on Windows, I couldn't get the whole docker thing running so I wasn't able to test these changes myself.

I'd be happy if someone could do a review and maybe even test the changes, especially with regards to image coordinates to make sure that everything lines up properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant