When I set a chest's minecraft:lock component to a string, then I set a item's minecraft:custom_name component to match the chest's minecraft:lock component string, the item can open the chest.
But when I set a item's minecraft:item_name to match the chest's minecraft:lock component string, the item can't open the chest and then tips the chest is locked.
Linked issues
duplicates 1
Comments 2
Thank you for your report!
We're tracking this issue in MC-271288, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as working as intended, which means this is not considered a bug and won't be fixed. Please do not leave a comment on the linked ticket.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Does MC-271288 describe your issue?