Spear Traps are common hazards seen in the Jungle.
Spear Traps will extend sharp wooden spears towards anything they sense, whether it is a Spelunker or not, dealing 4 damage to anything they hit. It should be noted that while they do detect other monsters and even corpses, they do not sense inanimate objects.
The spear trap is very short ranged; it can only sense things that are less than a tile away from it, and it's spears do not not even reach a full tile away. Despite this, they are exceedingly dangerous in the claustrophobic environment of the Jungle, especially when grouped around an Idol or situated next to a Web.
When a Spear Trap is directly adjacent to a web in a 1 block tight space, it is impossible for the player to move past the web without the trap hitting the player. When paired with the web, this is likely to keep the player in a state of being infinitely hit by the spear trap.
Furthermore, the spears will extend and retract repeatedly with only a short delay of about 1.5 seconds between each stab, but only deal damage while extending; retracting spears do no damage.
There is just enough time to climb on top of a spear trap between each cycle, and also enough time to jump off again once on top, but it is always safer to use a bomb or mattock to clear a path.
If one has a Shield, they can prevent the trap from extending altogether by pressing it against the wall of one.
Spear Traps are also found guarding Golden Idols alongside Thorny Vines. Although their placement makes it incredibly intimidating to even consider taking the Idol, there are two specific paths that the player can take; one without equipment, and one with either Spike Shoes or Spring Shoes equipped, which let the player stand on Thorny Vines with impunity: