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

Using the "reset" color in JSON text does not reset the color to default for enchanted item names and other cases

    XMLWordPrintable

Details

    • Bug
    • Resolution: Works As Intended
    • None
    • 20w19a, 20w20a, 20w20b, 20w21a, 20w22a, 1.16 Pre-release 1, 1.16 Pre-release 2, 1.16 Pre-release 3, 1.16 Pre-release 4, 1.16 Pre-release 5, 1.16 Pre-release 6, 1.16 Pre-release 7, 1.16 Pre-release 8, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w27a, 20w28a, 20w29a, 20w30a, 1.16.2 Pre-release 1, 1.16.2 Pre-release 2, 1.16.2 Pre-release 3, 1.16.2 Release Candidate 1, 1.16.2 Release Candidate 2, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4 Pre-release 1, 1.16.4 Pre-release 2, 1.16.4 Release Candidate 1, 1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 1.16.5 Release Candidate 1, 1.16.5, 21w05a, 21w05b, 21w06a, 21w07a, 21w08a, 21w08b, 21w10a, 21w11a, 21w13a, 21w14a, 21w15a, 21w16a, 21w17a, 21w18a, 21w19a
    • Confirmed
    • Commands
    • Normal

    Description

      The bug

      When attempting to use reset in JSON text as a color for enchanted item names and other cases, it does not reset the color to default. This does not happen in 1.15.2.

      How to reproduce

      Use the following command to give yourself an enchanted Stick with a customized name:

      /give @s stick{display:{Name:'{"text":"Wooden Stake","color":"reset","italic":false}'},Enchantments:[{}]}
      

      The name of the enchanted item is still aqua instead of the default color.

      Other information

      The bug also affects the following cases:

      • commands for Signs which should have black text at the end
        /give @s oak_sign{BlockEntityTag:{Text2:'[{"text":"blue ","color":"blue"},{"text":"black","color":"reset"}]'}}
        
      • commands for Chests or Trapped Chests which should have gray text at the end
        /give @s chest{BlockEntityTag:{CustomName:'[{"text":"blue ","color":"blue"},{"text":"gray","color":"reset"}]'}}
        
      • most JSON text in general
        [{"text":"Golden ","color":"gold"},{"text":"Pickaxe","color":"reset"}]
        

      Workaround

      Instead of using the reset color for the last text, an empty string can be added at the beginning of a text list:

      ["",{"text":"Blue","color":"blue"}," and Default"]
      

      However, it only works for other JSON text and not for item names.

      Attachments

        1. JSON_in_1.15.2.png
          JSON_in_1.15.2.png
          308 kB
        2. JSON_in_1.16.png
          JSON_in_1.16.png
          1.03 MB
        3. other_case_01.png
          other_case_01.png
          325 kB
        4. other_case_02.png
          other_case_02.png
          258 kB

        Issue Links

          Activity

            People

              boq [Mojang] Bartosz Bok
              jirauser283547 user-a4a49 (Inactive)
              Votes:
              9 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                CHK: