Open Novampr opened 8 months ago
From what I've gathered, the UUIDs are emulated by appending a bunch of zeroes in front of the xbox ID. I'm not sure how to implement it, considering this would be the first time the platform would attempt to do ID translation (to convert from the fake Minecraft UUID to an Xbox ID)
I'd be more than happy to help with the fake ID creation part, I just can't test as I don't have an Azure account and can't get a functional one Read this a little wrong, I actually know how in depth this goes and getting an Xbox ID is simple, the end of the UUID is a hex version of the Xbox ID, slice off the front and the Xbox ID is right there (in hex format)
For example my FUUID is 00000000-0000-0000-0009-01FA6F661C64
Remove all the 0s and -s to get 901FA6F661C64 which is 2535449912810596 in decimal :)
If it helps I have a bit of TypeScript code to do this conversion in a relatively quick manner
function convertFUUID(fuuid: string): string {
return parseInt(fuuid.substring(22).replace("-", ""), 16).toString();
}
Well the concern is not necessarily from creating the ID; the thing is that it'd be kind of a pain to store it as a real minecraft account internally as it'd show up under people's linked account (despite being a "ghost" account).
In the database the platform will most likely only have the Xbox ID stored as the user's xbox account. Performing ID translations means a platform is no longer "just" a simple lookup in the database, it may be a different set of paths to take that may eventually perform a preprocessing step.
Theoretically I could just achieve this via a simple HTTP redirect, but this is not entirely transparent to API clients so I pretty much have to do the translation/re-route internally which isn't something the current code is (easily and properly) capable of doing
Couldn't this be the in the same platform as Minecraft? That way you technically store the XUID for the Minecraft platform and can do a simple check after either it's a FUUID or a regular UUID, then you could do the needed database look ups then. I could be wrong, correct me if I am but this seems doable with the current system
Yes but the thing is: the platform doesn't have any "special handling" of any kind with platform and IDs. It just takes whatever input it gets, feeds it to the database, and gets results.
I'd preferably try to avoid having to do nasty platform-specific if/else branches in the middle of the platform-generic code and have a more generic way of specifying this type of things.
Put in other words; what the endpoint currently does is simply:
And it does so while treating all the parameters as opaque. What I'm saying is that I don't have a clean way at this time to add between reading parameters and querying the database a transform step that'd apply the transformation required here. And I really don't want to slap an if/else branch in there since that'd quickly become a nightmare if more transformations like this are needed.
Ideally I'd have a transform function that's part of the minecraft.ts
specification part and that'd transform that on-the-fly, with the function routing being dynamically handled.
Even this transform step aside, this brings a new issue since database queries may no longer be guaranteed to hit a single platform; it may need to fetch some minecraft accounts and some xbox accounts which isn't something the database abstraction is accepting at the moment...
And after that I'd still need to keep the original mapping to transform back the xbox IDs to the UUIDs used in the request (or dynamically rebuild them, alternatively...) which is a 3rd thing that needs to be taken care of 🤔
It's not very difficult, it's just a bunch of changes to the code structure that are needed 😅
Ah ok I think I understand now, no problems if you can't implement, thanks for being a cool developer tho 👍
Supporting Floodgate UUIDs would allow for java server using Floodgate/GeyserMC to have bedrock players have pronouns in the game using certain plugins/mods depending on the server, could be a nice little detail for bedrock players.