Vaults item_key checks for all components instead of only defined components
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.
Created Issue:
Vaults item_key checks for all tags instead of only defined tags
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.
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.
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.
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:
Unknown macro: {Tags}}}}}}
- Give yourself a trial key with {{
Unknown macro: {Tags}}}}
- 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.
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:
Unknown macro: {Tags}}}}}}
- Give yourself a trial key with {{
Unknown macro: {Tags}}}}
- 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.
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:
Unknown macro: {Tags}}}}}}
- Give yourself a trial key with {{
Unknown macro: {Tags}}}}
- It won't work, as the vault checks for all NBT
- Now, give yourself a key with just {
Unknown macro: { {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.
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:
Unknown macro: {Tags}}}}}}
- Give yourself a trial key with {{
Unknown macro: {Tags}}}}
- It won't work, as the vault checks for all NBT
- Now, give yourself a key with just {
Unknown macro: { {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.
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:
Unknown macro: {id}}
- Give yourself a trial key with {Tags:["test"],display:
Unknown macro: {Name}}
- 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.
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:
Unknown macro: {id}}
- Give yourself a trial key with
{Tags:["test"],display:Unknown macro: {Name}}
- 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
is duplicated by
relates to
is duplicated by
relates to
discovered while testing
Vaults item_key checks for alltags instead of only definedtagsVaults item_key checks for all components instead of only defined components
discovered while testing
Dear Shnu, related to MC-268183
Thank you for your report!
We're tracking this issue in MC-268183, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
– I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
Upon further investigation, this seems to affect every item that has non-default component data (e.g. custom_data). It seems to check for exact matches of the key item data; for example, the provided command does not work, but the following does:
/setblock ~1 ~ ~ vault{config: {key_item:{count: 1, id:"minecraft:dirt", components:{max_stack_size:2}}}}
This is a bit strict (could probably be just an id check?), but it's very likely intended.
Edit: this is a duplicate of MC-268183, though that ticket hasn't yet been updated to use components instead of tags.
I feel like this is intentional, as you can define in vault NBT what the key_item is, which includes item components. Therefore, you could also modify the vault NBT to make it only accept certain Trial Keys for mapmakers (then again, this is marked as a bug, so...)
I do feel like this should be fixed for named items, though. Maybe only check the "minecraft:custom_data" component?
Can confirm in 1.21
You can replicate this just in survival by simply renaming a Trial Key in an anvil - that trial key becomes unable to unlock any vault in trial chambers anywhere
Can confirm up to the most current snapshot 24w40a
Can confirm in 1.21.4
Can Confirm in 25w02a