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

Lock container field upgrades incorrectly to handle items with a formatted custom name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • 24w39a
    • None
    • Community Consensus
    • (Unassigned)

      Items that were previously able to open a locked container can no longer open locked containers when the item has a custom formatted text component. This is because the container's Lock field is upgraded in a way that tests for an exact component match.

      While we can expect data packs and commands to break between versions, it is generally assumed that items and block upgrade without problems.

      How to reproduce:

      1. Create a world in 1.21.1 (or in a snapshot before 24w39a)
      2. Place a locked chest
        /setblock ~ ~ ~ chest{Lock:"secret"}
        
      3. Notice that you cannot open the chest
      4. Give yourself an item to open the chest
        /give @s stick[custom_name='{"text":"secret","color":"red"}']
        
      5. Notice that you can open the chest when holding the item
      6. Open the world in 24w39a
      7. Notice that you can no longer open the chest when holding the item

        1. image-2024-09-26-19-37-58-947.png
          20 kB
          chenyuxuan
        2. image-2024-09-26-19-39-09-368.png
          33 kB
          chenyuxuan
        3. image-2024-09-26-19-40-31-024.png
          30 kB
          chenyuxuan
        4. javaw_G0lVXUi4BI.png
          59 kB
          [Helper] Misode

            Unassigned Unassigned
            Misoloo [Helper] Misode
            Votes:
            6 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: