-
Notifications
You must be signed in to change notification settings - Fork 125
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
[XSkull] - Inconsistent behavior in different server versions & online/offline servers based on usernames and UUIDs #254
Comments
Thank you for the detailed report. I briefly reviewed this. I'm just going to sum up the issues with the proposed solution:
Anyways, I've pushed some changes in 421a61a based on your proposed solution. I also made UUID/OfflinePlayer requests compatible with offline mode servers. |
- Add support for offline-mode servers - Implement asynchronous texture fetching option - Remove MOJANG_SHA_FAKE_ID_ENUMERATOR to prevent item stacking issues after restarts (UUIDs are now generated using texture hashes) - Store UUIDs in usercache.json and cache textures on first request - Ensure cached textures remain consistent across plugin interactions
I made a PR to address those issues, but I'm unsure if XSeries should cache profiles when using base64 textures
Although less likely, I think it's not worth doubling memory usage when multiple plugins request the same texture |
- Fix `XSkull.TEXTURES` constant (old clients require the HTTP protocol to render properly). - Add 1.8 remap for MinecraftServer getter. - Replace `XSkull.applySkin` with `XSkull#of` to handle both async and sync tasks. - Remove cache for profiles generated from base64 (CryptoMorin#254). - Log exceptions using debug level. - Rename `XSkull#getSkinValue` to `XSkull#getTextureValue`.
- Fix `XSkull.TEXTURES` constant (old clients require the HTTP protocol to render properly). - Add 1.8 remap for MinecraftServer getter. - Deprecate `XSkull.applySkin` in favor of `XSkull#of` - Remove cache for profiles generated from base64 (CryptoMorin#254). - Log exceptions using debug level.
Fix XSkull#applySkin with name or UUID inputs (#254)
Description
At the moment, applying textures does not work correctly in multiple versions. Each one has slightly different behaviors. This issue was previously discussed in another post, but no further details were given on the topic (#235)
1.12 (Online Server)
When applying a meta to an item stack, it generates the textures only if its GameProfile has a defined name or its UUID is stored in the server cache. Compared to the rest, the textures are applied synchronously, before being placed in an inventory
1.12.2 (Offline Mode)
Only textures applied via a cached UUID will be visible and stacked. None applied with a name are visible, but this is because
SkullUtils.applySkinFromName
skips these cases. They apply correctly otherwise1.19.4 (Online Mode)
Textures from offline users will be applied on the next tick, causing them not to stack when placed in an inventory. As in 1.12, users with a non-cached UUID are not visible
1.19.4 (Offline Mode)
Textures applied with usernames are visible if the
SkullUtils.applySkinFromName
's UUID check is ignored, except when the user is logged in. If applied via UUID, the texture will be visible, but only if the server caches it and the user is offline1.20.4 (Online Mode)
It works the same as in 1.19. The difference is that this throws an error if the UUID is not cached, since here it returns null for the offline player instance
1.20.4 (Offline Mode)
No textures are applied when using usernames, regardless of disabling
SkullUtils.applySkinFromName
checking for offline uuidsAt first, I had in mind grabbing the server cache, as mentioned in #235, and then requesting an external API. However, this still maintains inconsistencies between versions and online/offline modes
Draft for how it could be handled (b69f315)
It caches all textures but doesn't make those first requests asynchronous, blocking the main thread
1.12.2 (Offline Mode)
1.20.4 (Online Mode)
The text was updated successfully, but these errors were encountered: