UUID Storage Method Request
AetheriMC opened this issue · 5 comments
Hello!
To start, note that this is not related to an existing issue or a bug. Additionally, to keep the explanation simple, I'll explain what I'm trying to accomplish before elaborating further on the request. This is for Minecraft 1.18.2-forge-40.1.0.
The Goal
Essentially, I am working on a function which will allow players to resurrect another player using their nearby corpse as a catalyst. What the function will do, is store each player's UUID into a scoreboard and then compare that score with the Player UUID stored within a nearby corpse (which will also be stored in a scoreboard) using execute commands. If the two scores match, then the execute will teleport the matching player to their corpse, thus completing the resurrection.
The issue I'm having however, is that while a corpse' NBT data does in fact contain the fallen player's UUID data, it is currently being stored in the form of UUIDMost and UUIDLeast, which (as far as I understand) is no longer the preferred method of storing UUID for player's in more recent versions of Minecraft. Since corpses do not contain the NBT data using the current method of UUID formatting, I am unable to compare the UUID of a player against that of the corpse.
To get around this, I have tested /data commands to retrieve the corpse's PlayerName data, which does work, but since player NBT does not contain the player name, I'm unable to match it up with anything as well. Plus, quite frankly, trying to find methods of storing strings instead of integers is just a right pain in the ass. :)
Would it be possible to add player UUID to corpses, using the more recent UUID format upon generating? The clerics of my server would like to know.
Much appreciation!