Mojira Archive
MC-158066

Chest Lock Mechanic for Possible Secure Locks not function as expected

I am trying to make a lock in the game that would be done through a datapack to create a lock that cannot be spoofed or made ingame. I plan to add another layer of security to this through a scoreboard but id like to still be able to make a lock that you are unable to create from an anvil. Currently I have done a few different combinations of escape characters to figure out how to make these match as needed but I specifically need a way to append a string to an array in a name (Which is not possible I do not believe) As attempting to create this I noticed that if I supply the follow NBT data for the Chest and a Paper i name the same as the lock it does not work.

 
NBT Tags given

chest{Lock:'[{"text":"§k§l§m§n§o§r"}]'}
paper{display:{Name:{"text":'[{"text":"§k§l§m§n§o§r"}]'}}}

Expected Results
Able to open the chest with the paper

Given Results
Unable to open chest and the image blow shows the data of the lock and the named paper are the same.

You can test this by running a /data get block and /data get entity and you will notice the values appear to be the same but the key does not open the chest.

Invalid

Andrew Gay

2019-07-30, 08:30 PM

2019-08-01, 02:58 PM

2019-07-30, 09:37 PM

0

1

Unconfirmed

Commands

1.14.4

-