Mojira Archive
MC-89938

Mobs won't attack if target isn't in the middle of a block

Zombies and some other mobs (slimes, silverfish, endermites...) sometimes don't succeed in hitting you if you aren't in the middle of a block. Instead they will try to hit the middle of the block.

Steps to reproduce:

  1. Create a superflat world with cheats enabled
  2. Run the command /tp @p 0 ~ 0.9
  3. Run the command /gamerule doMobSpawning false
  4. Run the command /time set night
  5. Run the command /summon Zombie ~ ~ ~-5
    This does not always seem to work, tough.

Or an easier method:

  1. Place down a wall an walk as close to it as you can
  2. Spawn a zombie in front of you and note how it doesn't succeed in hitting you

EDIT:
Now mostly happens with baby zombies. Also see Marcono1234's comment.


Code analysis by Marcono1234 can be found in this comment.