Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-268183

Vaults item_key checks for all components instead of only defined components

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 24w05a, 24w05b, 24w06a, 24w07a, 24w09a, 24w11a, 24w12a, 24w13a, 1.20.5
    • Confirmed
    • Commands, Items
    • 1225151
    • Expansion B

      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:

      1. Setblock a vault with 
        {config:{key_item:{id:"minecraft:trial_key",Count:1,tag:{Tags:["test"]}}}}
      2. Give yourself a trial key with 
        {Tags:["test"],display:{Name:'{"text":"Super key!"}'}}
        
        • It won't work, as the vault checks for all NBT
      3. 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.

            Unassigned Unassigned
            Yanis48 Yanis
            Votes:
            9 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: