1

Help Needed With /data Command

AluxesXD 10/30/20 10:16 am
319
11/5/2020 4:50 pm
So, I am building an arena in my realm, and in it I have 30 chests set up with the command /data merge block x y z {lock:"Key"}, they all are set up correctly and work as intended, and are in a chunk several hundred blocks away from my house. I am trying to now setup a single trapped chest to work as a locked button for the admins of my realm, and despite using the exact same command and it even telling me that the block I am trying to modify is in fact being modified (or not if I break it before trying the command) I can open the chest without the key. Is there a limit for how many chests can be locked with this command? Is another setting (I attempted to force load several chunks in the early days of this realm) causing this to not work in this chunk specifically? Any insight would be very much appreciated because trying to google my issue has been fruitless.
Posted by
AluxesXD
Level 1 : New Miner
0

  Have something to say?

JoinSign in

6

ShelLuser
10/31/2020 11:54 am
Level 61 : High Grandmaster System
history
What version of Minecraft are you using?

Anyway, I don't know how you came up with the command above but that's not the right way to lock a chest. You can see for yourself if you examine the chest using: /data get block x y z; there won't be a lock property. Lock on the other hand... Capital letters matter, so always make sure you share the right commands, otherwise you'll only risk confusing people.

Anyway, I did some testing and things work just fine for me (not at first because I messed up ;)). Sure you didn't use "lock" instead of "Lock"?
1
AluxesXD
11/02/2020 11:48 am
Level 1 : New Miner
history
I am running 1.16.3, I got the command from https://www.digminecraft.com/game_commands/add_lock_to_chest.php and as I said at the beginning it has worked 30+ times already in the same realm, so it is in fact a correct way to lock a chest. As for capitalization errors i tested all of that and even spacing and any other use of the /data command despite like I said the exact same command having worked 30+ times before, and the 30 still existing chests work perfectly. When I use the command setup properly it will tell me it modified the block, but the chest wont be locked unlike the other 30 chests in my realm.
1
ShelLuser
11/02/2020 5:53 pm
Level 61 : High Grandmaster System
Sorry to say but it's not the correct way, just look at the block entity data for a trapped chest, you can find it on the wiki:

https://minecraft.gamepedia.com/Trapped_Chest#Block_entity

You'll notice Lock vs. lock, capital letters are important within NBT data.

Ergo, the correct way is: /data merge block x y z {Lock: "key"}. If you use this command on a chest and follow up with /data get block, you'll notice the lock property being mentioned. Replace Lock with lock and the data won't be there, thus your chest won't be locked.
1
AluxesXD
11/04/2020 2:47 am
Level 1 : New Miner
history
I've said I've TRIED it capitalized and SUCEEDED in making 30+ locked chests already in this worlds WITH THIS COMMAND and the capitalization in my post doesn't reflect my entire attempt at doing this. What part are you missing?

The fact that I have done this 30+ times and currently have 30 chests locked using this command?

The fact that I have literally said that I tried it with a capital L in the word lock and despite it having already worked 30+ times Lock or lock makes NO DIFFERENCE?

You are drawing focus to the one thing that I have already SAID is NOT the problem. If you're trying to help, GET OVER THE L. IT ISNT THE PROBLEM.

I literally have used this command on chests, trapped chests, and barrels, THEY ALL WORK.

I have used this command to make 30 chests with 30 separate keys, THEY ALL WORK.

Either you're choosing to not read my entire post and or comment carefully enough to actually know what I said, or you actually believe I'm an idiot.
1
ShelLuser
11/04/2020 12:30 pm
Level 61 : High Grandmaster System
Either you're playing with a modded version of Minecraft and failed to mention this or you're not looking to get help but are actually after pointless discussions, that's what I'm currently thinking.

Simple deduction: I always try the suggestions I give, and well, I have enough experience with Minecraft that I don't have to look up commands on websites but I design my own. And the command doesn't work without a capital L. Do with that as you will, I'm done.
1
AluxesXD
11/05/2020 4:50 pm
Level 1 : New Miner
You literally didn't help at all. You're not helping by pointlessly suggesting to use a capital L when I had said numerous times I tried that, so my deduction is you have some stick up your ass and think that everyone else is stupider than you. But enjoy stroking your ego saying to yourself you helped someone.
F.Y.I. I figured it out myself and your uselessness was a waste of my time.
1

Welcome