Minecraft wiki entry for Traps, associated text: When the player chops down the tree, the TNT will be lit by the observer. The observer can be replaced by a lever and a NOT Gate if you are short on quartz.