Skip to content

Enhance credential handling for user profiles#367

Open
TavstalDev wants to merge 1 commit intoxfl03:15-developfrom
TavstalDev:15-develop-fix-skulls
Open

Enhance credential handling for user profiles#367
TavstalDev wants to merge 1 commit intoxfl03:15-developfrom
TavstalDev:15-develop-fix-skulls

Conversation

@TavstalDev
Copy link
Copy Markdown

Fix for the following issue affecting skulls:

  • A lot of the Chest GUI plugins give custom textures to their skulls without providing a custom id or name, that caused the client to use the same singular cache entry even when their texture value was different.

…an issue regarding skulls using the same texture because of missing game profile name or id.
@ZekerZhayard
Copy link
Copy Markdown
Collaborator

ZekerZhayard commented Mar 4, 2026

I also considered this issue in another PR, but what are the pros and cons of your implementation compared to directly using toString?

https://github.com/xfl03/MCCustomSkinLoader/pull/349/changes#diff-6da2e5267b411bfa1c28ef339f7da0f2bf2edbf3e02d676360d67c1a8288ceddL88

@TavstalDev
Copy link
Copy Markdown
Author

Here is the comparison of the results of each solutions.

Example results for a player:

Original - 44 bytes:

Tavstal-2c71d9eb-a5c7-4e38-936e-55a5a0674c63

My solution - 52 bytes:

Tavstal-2c71d9eb-a5c7-4e38-936e-55a5a0674c63-3ea3a2d

gameProfile.toString() - 693 bytes:

com.mojang.authlib.GameProfile@1fe12b16[id=2c71d9eb-a5c7-4e38-936e-55a5a0674c63,name=Tavstal,properties={textures=[Property[name=textures, value=eyJ0aW1lc3RhbXAiOjE3NzI2MzkxNDM3NjMsInByb2ZpbGVJZCI6IjJjNzFkOWViLWE1YzctNGUzOC05MzZlLTU1YTVhMDY3NGM2MyIsInByb2ZpbGVOYW1lIjoiVGF2c3RhbCIsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6MzY3NjcveWdnZHJhc2lsL3RleHR1cmVzLzlmYzdiMGUyM2E0ODBiMTQ0NTlhYmE4YTkzZjk0NTQwOThmODBhODcwNzc4MTNkYmFlODdkNjRiYTZkNjNmOTgiLCJtZXRhZGF0YSI6eyJtb2RlbCI6ImNsYXNzaWMifX0sIkNBUEUiOnsidXJsIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6MzY3NjcveWdnZHJhc2lsL3RleHR1cmVzLzBlNjU4ZGQ2NWIwOTc0MDIxNTdkZjAzNmYzYmVhMmQ0MDE2MDA0MjUyMzZjMzVjOGY0MDgzY2ZhOGQ5MWVlM2IifX19, signature=null]]}]

Example results for a skull:

Original - 37 bytes:

-92864445-51c5-4c3b-9039-517c9927d1b4

My solution - 46 bytes:

-92864445-51c5-4c3b-9039-517c9927d1b4-5ac3daf0

gameProfile.toString() - 338 bytes:

com.mojang.authlib.GameProfile@2072cc01[id=92864445-51c5-4c3b-9039-517c9927d1b4,name=,properties={textures=[Property[name=textures, value=eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOGI3ZjBlNmRiNTIyMjk5MzQxZjEyMTMxNDcyMWZkYzFmN2NiYmU1MDA0ZDhjYTQyZTU0N2E3OWFmMDIxZGM1In19fQ==, signature=null]]}]

I think my solution is more lightweight compared to the toString() one, but the toString() one makes it more unique and reduces the chance of this issue happening.
Maybe the best solution would be just using the value of the textures property as credential.

What are your thoughts about it?

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

Successfully merging this pull request may close these issues.

3 participants