The nbt field in can_break/can_place_on data components sometimes does not work
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:
- 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"}}'}]}] - Place a empty decorated pot and put a stick in it.
- Ctrl + Pick the decorated pot and place it aside. You can verify that these blocks have the same NBT tags.
- Switch to adventure mode.
- 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.
2024-06-03, 08:49 AM
2024-10-31, 12:08 PM
5
4
-