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

The nbt field in can_break/can_place_on data components sometimes does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.6, 1.21 Pre-Release 2, 1.21 Pre-Release 3, 1.21 Pre-Release 4, 1.21 Release Candidate 1, 1.21, 24w33a, 1.21.1 Release Candidate 1, 1.21.1, 24w35a, 24w37a, 24w39a, 1.21.2, 24w44a, 1.21.3
    • None
    • Community Consensus
    • Commands
    • Normal
    • Platform

      The bug:

      The nbt field in the can_break/can_place_on data component does not match the nbt of some container blocks without Ctrl + Pick.

      Steps to reproduce:

      1. Give a tool which can break a decorated pot containing only one stick.
        /give @s diamond_sword[minecraft:can_break={predicates:[{blocks:"minecraft:decorated_pot",nbt:'{item:{count:1,id:"minecraft:stick"}}'}]}]
        
      2. Place a empty decorated pot and put a stick in it.
      3. Ctrl + Pick the decorated pot and place it aside. You can verify that these blocks have the same NBT tags.
      4. Switch to adventure mode.
      5. Break them all with the sword.

      Observed Behavior:

      Step #1 pot is broken but Step #2 pot is not broken.

      A further test: After saving and reloading the world, Step #2 pot can be broken.

      Note: It seems that the bug exists in other container blocks as well. I have tested the chiseled bookshelf and the shulker box, and their behavior matches the Step #1-5 but still can't be broken after reloading.

      Expected Behavior:

      Both decorated pots can be break.

        1. image-2024-06-07-02-28-51-326.png
          1.48 MB
          BugTracker
        2. strangefield.mp4
          7.20 MB
          SilentPaltos

            Unassigned Unassigned
            CaN2crow987 CaN2crow987
            Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: