While playing around with Vaults and Trial Keys, I discovered an inconsistency about NBT checks.
Vaults' item_key tag checks if all NBT tags match, instead of just the defined ones in the tag.
I explain myself:
- Setblock a vault with
{config:{key_item:{id:"minecraft:trial_key",Count:1,tag:{Tags:["test"]}}}}
- Give yourself a trial key with
{Tags:["test"],display:{Name:'{"text":"Super key!"}'}}
- It won't work, as the vault checks for all NBT
- Now, give yourself a key with just
{Tags:["test"]}
- It will work, because the whole NBT match
That's an issue if a player renames their key item, because it will no longer match the vault's key item.