I know that when you open a trapped chest, it generates a small redstone signal. So I locked the chest with /blockdata ~ ~-1 ~ {Lock:"Name of chest"}, but when I right click, it doesn't generate a redstone signal. I know this is quite obvious, but I wanted to make a system where if you try and open a trapped chest, it would trigger a command block.

How can I do this?


2 Answers 2


Are you sure no redstone signal is generated? The strength of the signal is determined by the number of players accessing the chest at any one time, meaning if you are the only person opening it, it will have a strength of one, which is hard to see. Of course, this also means a range of a measly one block, meaning you will have to boost it with a repeater or redstone torch construct.


A scoreboard of the type minecraft.custom:minecraft.trigger_trapped_chest triggers even if the chest is locked. This means that you can just let a command activate the redstone wire some other way whenever that scoreboard gets set to 1 for a player, for example by placing a redstone torch under the block that the wire is on.

This would still be a bit complicated if multiple locked trapped chests exist, in that case you can in the easier case assume the closest one, in harder cases you would need to do "raytracing" (recursively moving forward and checking for looking at a block to make sure that the chest that was actually clicked is the one you think it is).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .