Chests don't have their {Lock:""} in the new format used everywhere else. I noticed that when I tried to copy a name of an item into the Lock of a chest, so then I could open it with this item.
What I expected to happen was...:
Copying the name from an item in a chest/dropper/whatever into the Lock tag of a chest should set the Lock value to the item's name so then I can use it to open the chest.
What actually happened was...:
It copied the "{\"text\":\"<name here>\"}" into the Lock tag and requires an item named {"text":"<name here>"} to open instead of <name here>.
Steps to Reproduce:
1. Put a chest/dropper/dispenser somewhere you know with a named item inside (example: a torch named 'potato' in the first slot);
2. Put a chest somewhere else;
3. Run the command:
/data modify block <pos of the chest> Lock set from block <pos of the chest/dropper/dispenser with the item> Items[0].tag.display.Name
4. It will set to {Lock:" {\"text\":\"potato\"} "} and will require an item named {"text":"potato"} instead of 'potato'
Linked issues
Comments 6
I am creating a datapack. It should work with any name. How am I gonna do this? There's a way to copy a name to Lore, there's a way to copy name from one to another, but I can't copy its name as a key for a chest because it doesn't copy the name itself / Lock doesn't work with this format of name ( {"text":"key"} ). That's the thing.
I know just using commands like that knowing the name is easy, but it is not possible to do this automatically with a datapack / function / commandblock
So what is it? What should I do?
It's bizarre that you can copy anything to anything but not a text into a Lock tag.
Should I call it a suggestion to a new feature?
I called it a bug because this is the only one tag that doesn't follow the new format :/
Yeah you could post it to https://www.reddit.com/r/minecraftsuggestions/ or https://feedback.minecraft.net/hc/en-us
I think thats not a bug, bcs the Lock tag is extremelly old, but as Minecraft improved Name and everything with json format, that shoulded be fixed, thats what I think, its an Old never updated tag
so.. I don't think this post shoulded be tagged as Fixed, as this is a old feature that needs a fix yet, so to developers see that, shoulden't be tagged as fixed