Spider

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

Spawning
1–4 spiders spawn in a 3×3×1.5 (2×2×1) space on an opaque block in the Overworld at a light level of 7 or less. The top blocks can be transparent, but not solid.

A spider spawns in leaves provided that there are 3×3×2 spaces around as forested biomes have a greater amount of spiders; they do not spawn in groups.



Spawners
Spiders spawn from spawners in dungeons (25% chance), as well as secret rooms surrounded by cobwebs in woodland mansions.

Status effects
On hard difficulty, spiders occasionally spawn with status effects. For each pack spawn, there is a (10&times;clamped regional difficulty)% chance of the game applying a status effect. This does not apply to cave spiders. If it decides to do so, then it selects the effect. The spider can spawn with following effects:
 * (40% chance)
 * (20% chance)
 * (20% chance)
 * (20% chance)

The effect is then applied to all entities within the pack, lasting for about 3.4 years. If the Invisibility status effect is applied to a spider, its eyes remain visible, similar to invisible endermen.

Drops
Upon death, a spider drops:
 * 0–2 . The maximum is increased by 1 per level of Looting, for 0-5 string with Looting III.
 * when killed by a player or tamed wolf.
 * A $1/3$ chance of dropping a when killed by a player or tamed wolf. The maximum amount of spider eyes is increased by 1 per level of Looting. The chance of a spider not dropping any spider eyes can be found using the formula  . For example, Looting III gives a $1/3$ chance of not dropping any spider eyes. All other amounts have an equal chance of occurring.

Behavior
Spiders become hostile to players and iron golems as long as the light level immediately around them is 11 or less; otherwise, they do not attack unless attacked. Hostile spiders see up to 16 blocks, continuing to chase even when exposed to well-lit locations. If a spider sustains damage from a source other than a direct attack, such as falling, its hostility resets to a neutral state.

Spiders can climb up over solid blocks but not overhangs or on ceilings. If a spider cannot find an ideal path to the player, when they go behind or on top of a wall, it approaches as close as it can to the player's position from the outside or below as it can see through blocks, at that time proceed by climbing the wall vertically until it gets to the top, even if it loses its aggression toward them. When a spider loses its aggression, it continues moving forward blindly for 2 seconds; this behavior causes the spider to climb up any walls in its path.

Spiders cannot climb magma blocks. Note that Cave Spiders, on the other hand, can climb them on all editions.

If a spider tries to go through the world border, it starts climbing the world border instead.

If shot with arrows when outside of the detection range, spiders turn and run in the direction from which the arrow was fired. If the player moves away, the spider continues following the same path unless the player enters the detection range, in which case the spider changes direction and attacks.

Even though spiders do not inflict the Poison status effect, they are immune to it. They are also immune to the slowing applied to most mobs when walking through cobwebs.

An aggressive spider pounces at close range. When it is swimming in 1-block-deep water it pounces upon touching the submerged floor. They can attack when their Y-axis position is changed.

Spiders flip onto their backs when they die, unlike all other mobs, which land on their sides.

The Bane of Arthropods enchantment inflict Slowness IV and more damage to spiders.

Spider jockeys
There is a 1% chance for a spider to spawn with a skeleton riding it, forming a spider jockey. In the Nether, if a spider is spawned there with a spawn egg, commands or spawners, it has a 0.8% chance to spawn a wither skeleton on its back and form a wither jockey instead. In some of snowy biomes, a spider has a 0.8% chance to spawn a stray on its back and form a stray jockey instead. A spider jockey can also be spawned by the command.



ID




Entity data
Spiders have entity data associated with them that contains various properties.

Video
Note: This video says that cave spiders can poison the player, but not in easy difficulty.

Trivia

 * In normal conditions, spiders actually float above the ground, but this is often not noticeable due to the difference between the player's height and a spider's height.
 * A spider jockey's (or a stray jockey) skeleton can sometimes accidentally shoot its own spider. This may cause them to become hostile to and attack each other, until either or both of them die.
 * Because the spider and skeleton in a jockey are two separate entities, using a "Dinnerbone" name tag flips only the skeleton or spider instead of the entire jockey.