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

[Execute if] Testing for custom naming text components are order dependent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • 24w45a
    • None
    • Windows 10
      32 GB Ram
    • Unconfirmed
    • (Unassigned)

      Testing for custom item names depend heavily on the placement of the text components.

      Example:
      When testing for an item named "Sun's Cowl" with no italics
      This doesn't work:

      /execute as @a if data entity @s Inventory[{Slot:103b,id:"minecraft:player_head",components:{"minecraft:custom_name":'{"text":"Sun\'s Cowl","italic":false}'}}] run say @s
      

      But this does:

      /execute as @a if data entity @s Inventory[{Slot:103b,id:"minecraft:player_head",components:{"minecraft:custom_name":'{"italic":false,"text":"Sun\'s Cowl"}'}}] run say @s
      

      Desired result:
      Testing for the components won't matter where the same components were placed

            Unassigned Unassigned
            ArsiTheFox ArsiTheFox
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: