Spider

Spiders are common neutral mobs that have the unique ability to climb walls.

Spawning
Spiders spawn in the Overworld in 3×3×2 space on solid blocks (centered on the middle block) at a light level of 7 or less, in groups of 4. The top blocks can be transparent, but not solid.

In Bedrock Edition, leaves may spawn a single spider provided that there are 3×3×2 spaces around it.

Monster spawners
Spiders spawn from spawners found in 25% of dungeons. They also spawn from spawners in rare hidden rooms in Woodland mansions.

Potion effects
On hard difficulty, spiders will occasionally spawn with potion effects. For each pack spawn, there is a (10&times;clamped regional difficulty)% chance that the game will attempt to apply a status effect. If it decides to do so, then it selects the effect. The spider can spawn with following effects: The effect is then applied to all entities within the pack for the maximum amount of time possible.
 * (40% chance)
 * (20% chance)
 * (20% chance)
 * (20% chance)

This does not apply to Cave Spiders.

Drops
Spiders drop upon death:
 * 0-2
 * (⅓ chance if killed by a player or tamed wolf, and ½ / ⅔ / ¾ chance with Looting I/II/III).
 * 5 experience orbs if killed by a player or tamed wolf.

Behavior
Spiders are hostile to the player and to iron golems as long as the light level immediately around them is 11 or less; otherwise they won't attack unless a player attacks first. Hostile spiders will continue to chase the player even if they are exposed to well-lit locations. If a spider sustains damage from a source other than a direct attack from the player, such as falling, its hostility will be reset.

Spiders can climb up over walls and other obstacles. If a spider cannot find an ideal path to the player (when a player goes behind or on top of a wall), it will get as close as it can to the player's position from the outside or below, and proceed to climb the wall vertically until it gets to the top, even if it loses its aggression towards the player. Additionally, when a spider loses its aggression on the player, it will continue moving forward blindly for about two seconds. This behavior causes the spider to climb up any walls in its path.

If shot from distance with an arrow when outside detection range, spiders will now turn and run in the direction the arrow was fired, essentially towards the player. If the player moves away, the spider will still follow the same path unless the player enters detection range, then the spider will change direction and attack.

While not poisonous themselves, spiders are unaffected by the poison status effect.

Spiders will often jump around when attacking. At close range, spiders occasionally pounce their attackers.

If a splash potion of Invisibility is thrown at the spider, its body will vanish but its eyes will remain visible.

Spider jockeys
There is a 1% chance that a spider will spawn with a skeleton riding it, forming a spider jockey. In the Nether, a spider (spawned with a spawn egg, commands or mob spawners, since these do not naturally spawn there) has a 0.8% to spawn a wither skeleton on its back and form a wither jockey instead. In snowy biomes, a spider has a 0.8% to spawn a stray on its back and form a stray jockey instead. A spider jockey can also be spawned by the command. On hard difficulty, spiders have up to a 10% chance (depending on regional difficulty) of spawning with a single beneficial status effect. This effect can be speed (40%), strength (20%), regeneration (20%) or invisibility (20%), and has an essentially infinite duration.

Data values
Spiders have entity data associated with them that contain various properties of the mob. Their entity ID is.

Trivia

 * If the water a spider is swimming in is only 1 block deep, they may pounce nearby enemies upon touching the submerged floor.
 * Spiders do a flip and land on their backs when they die, unlike most mobs (which land on their sides).
 * If a spider tries to go through the world border it will start climbing the world border.