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

Item modifier to remove specific tag in "custom_data" field exhibits strange behavior

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.21
    • None
    • OS: Linux Mint 20.2
      Java Version: 21
    • Community Consensus
    • Commands

      summary

      "!" operator used outside of the root components field displays inconsistent behavior with its use in the root components field

      steps to reproduce

      1. run command: 

      /give @s amethyst_shard[custom_data={"some_custom_data":{}}] 

      2. hold the amethyst shard in your main hand

      3. run command:

      /item modify entity @s weapon.mainhand [{"function":"minecraft:set_components","components":{"minecraft:custom_data":{"!some_custom_data":{}}}}] 

      4. run command:

      /data get entity @s SelectedItem 

      expected result

      item's "custom data" field should either:

      • be empty, if "!" operator is permitted inside of another component
      • contain both "some_custom_data" and "!some_custom_data" if operator is not permitted inside of another component

      actual result

      item's "custom data" field contains only "!some_custom_data", as if the relevant tag were removed, but the tag signalling to remove that tag were also added.

            Unassigned Unassigned
            Cello2WC A Q
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: