Cave Spiders / Normal Spiders don't deal actual damage when 'jumping' towards the player, but attack (Deal damage) when are far from the player (1-2 Blocks) wihtout actually touching / coming close to Player's Hitbox.
How to Reproduce:
- Create new world and spawn some cave / normal spiders
- On Gamemode 0 tap 'Toggle prespective' (F5) to see yourself and the spider from the side
- Let the spider attack you and watch from how far away it is attacking you and when it is jumping
- The spider jumps, then fall back on the ground. After a couple milliseconds it attacks you (Deals damage to you) from around 0.9 to 1.8 blocks from your hitbox. (In my own tests)