Minecraft wiki entry for Traps, associated text: If someone puts something inside the chest, it will go into the hopper, turn on the comparator, and activate the TNT. You could attach the comparator directly to the chest, but it would be more obvious as you can see over chests. Trapped chests are also an option but they can be seen by experienced players. Also, they can be seen more easily with resource packs.