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

Support Optifine Cape #10

Open
killerprojecte opened this issue Apr 21, 2024 · 3 comments
Open

Support Optifine Cape #10

killerprojecte opened this issue Apr 21, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@killerprojecte
Copy link

with parameter ?optifine=true will render optifine cape if player have it

Cape API: https://optifine.net/capes/.png

Example Links:
https://optifine.net/capes/Notch.png
https://optifine.net/capes/BadBoyHalo.png

I think default cape / custom (banner) cape are not same type (with different size)

@NickAcPT
Copy link
Owner

Hey, sorry for not answering this sooner.

Originally I wasn't going to implement optifine support as I don't want to limit things to a single mod.

I think default cape / custom (banner) cape are not same type (with different size)

Regarding this, I did go ahead and check the image resolutions and the result was this:

Name Resolution
Default 46x22
Banner 92x44

The capes have different resolutions but the aspect ratio is consistent within themselves. However, the resolution is different from the Minecraft cape images and will definitely require some extra logic to handle that.

I did see the PR #11, but so far I am thinking of implementing the support in a different way, as I am brainstorming a different system that would allow to custom cape support without adding specific logic in the code itself.

Oh, and caching logic might need to be changed as well to account for the capes.

In the following days, I will (hopefully) implement a proper system for custom capes.

@NickAcPT NickAcPT added the enhancement New feature or request label Apr 22, 2024
@killerprojecte
Copy link
Author

I think I can change OptifineCape to CustomCape on my PR and provide the option to modify the cape texture url in the configuration file, just like the mojang configuration

To support optifine cape resolution just add a customize resize option or provide a resize mode for optifine cape

@NickAcPT
Copy link
Owner

Reopening this since the issue itself (supporting optifine and other capes) isn't fully implemented yet.

The commit e621000 introduced a way to render skins with any cape, as long as it matches the expected aspect ratio (2:1), but only for POST requests (these essentially let you have custom skins in general.

@NickAcPT NickAcPT reopened this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants