The bug
Each vault can only track up to 128 players, if 128 players have already opened the vault and another new player opens the vault, the first player tracked by the vault will be forgotten and becomes able to open the vault again.
How to reproduce
Unable to reproduce in vanilla singleplayer, unless installing mod such as fake player mod or play a server with enough players.
Expected results
Each vault can track infinite players.
Observed results
Each vault can only track 128 players.
Linked issues
Comments 2
I have completely confirmed and proved this intended behaviour exists in Bedrock Edition in the same way Java does.
Since it’s not easy having to get 128 player uids after the first uid present in rewarded_players to prove intended behaviour exists, here is how it was done. (This involves an NBT editor in this case to make it easy.) These steps were tested on Bedrock. Could have been easier if /data was present on Bedrock…
The easy way of proving the intended behaviour exists can only be tested easily on Windows, due to availability of structure block export.
First, I placed down two vaults spaced out by one block. I opened the vault to the right with a trial key.
Then, I placed down a structure block, got the 2 vaults I just placed in the structure block area, and exported the structure file.
Then the structure file is opened in an NBT editor like NBT Studio. I looked at the vault that contained the in game player uid inside rewarded_players list tag, which is inside data compound tag in that vault’s block entity data. (The vault I opened.)
Next, for the long that existed in rewarded_players, I changed it to a value from the player uid present there to -2. Inside the same rewarded_players list tag that now also has a long with value -2, I then added 127 more longs there . Each new long tag I added in there having values 1 to 127 inclusive, ensuring no long in rewarded_players uses duplicate values. I ensured 128 longs total were present in that rewarded_players tag.
I then saved the structure file in the NBT editor.
To allow loading in the same world, I renamed the structure file to a slightly different name, and also I changed the value structureName (from the StructureBlock tile entity data) to a slightly different name from before.
I then saved the structure file in the NBT editor again.
I placed the edited structure file in the same world, slightly away from the original testing area. I then opened the edited vault (Which was in my case, a vault to my right side) with a trial key again.
I have exported the newly placed structure again under a slightly different name to what I edited in the NBT editor, appearing first as the edited name from the original before the structure name is changed again and the structure was being exported under a slightly different file name to edited.
Using the newly generated structure file with the structure name being edited twice from original, I checked in the NBT editor NBTStudio, checked back in the vault which has rewarded_players with 128 longs, and I noticed something. The edited player uid containing -2 was gone from the top of the list, and the legitimate player uid appeared at the bottom.
Please edit your report to change the Affected Version to the version shown on the Minecraft title screen