82

How far can mobs see?

I know if I have my render distance set to far then I can see mobs before they see me. Does anyone know precisely how far a mob can see?

This would be really nice to know since I could simply make sure there is water around my island that goes further than mobs can see.

4
  • 2
    At the very least, ghasts have a longer range, I think.
    – Macha
    Feb 26, 2011 at 16:10
  • 2
    On a side note I do know that mobs will not spawn within 24 blocks of the player. Feb 26, 2011 at 19:07
  • 1
    I'm surprised there isn't an answer on some forum post somewhere...bounty time!
    – Kevin Yap
    Feb 27, 2011 at 22:28
  • @ Ben Kennett: Except in a monster dungeon.
    – Not a Name
    Feb 28, 2011 at 21:55

3 Answers 3

87
+50

Here is the relevant piece of code from the Minecraft source:

EntityPlayer entityplayer = worldObj.getClosestPlayerToEntity(this, 16D);
        if(entityplayer != null && canEntityBeSeen(entityplayer))

This means that the range of sight is 16 blocks; however, there's also something funny. For one, if there is a closer player than you, but they can't be seen (for example, if the closer player is behind a wall), then the mob won't notice you.

Additionally, the ghast uses a separate method including:

worldObj.getClosestPlayerToEntity(this, 100D);

So it will see you 100 blocks away.

6
  • Awesome, glad to see my digging was correct at least
    – Rapida
    Feb 28, 2011 at 21:51
  • 3
    Nice source code digging!
    – Kevin Yap
    Mar 3, 2011 at 22:33
  • 6
    @Not a Name Where did you get the source code? Aug 29, 2013 at 1:55
  • 1
    I am guessing this is no longer accurate for zombies? I can see them running at me from a long distance away.
    – Zoredache
    Apr 22, 2014 at 18:34
  • 1
    @Zoredache I'm not sure when this was added, but zombies do have the ability to alert other nearby zombies when they detect you, so it might be that happening. May 2, 2016 at 22:46
11

This isn't the best evidence I've ever dragged from the interwebs, but here is what my searching on the minecraft forums has found.

Mobs seem to have an awareness extending 16 blocks.

I never did find this factoid spelled out specifically but I did find these posts referencing it:

From the numerous threads I've been reading (and my own experience) the mobs also don't rely on sight. So if you are digging in a tunnel next to a hostile cave the mob knows you are there.

2
  • but they won't attack if they don't see you, they only know that your there.
    – user7498
    Mar 2, 2011 at 12:54
  • @Thomqa True, that's why you get the creeper bounce next to glass panes (I think)
    – Rapida
    Mar 2, 2011 at 14:52
7

All have 16 blocks line of sight, except the Enderman, which has 64 blocks, and Ghasts, this time 100.

2
  • 2
    Hi @AgentClover1, and welcome to Arqade! Your answer provides the same basic information that the accepted answer provides, but with less detail. In this case, we would encourage you to edit an existing answer to provide more detail.
    – MBraedley
    Feb 6, 2013 at 13:25
  • 5
    @MBraedley He did add the Endermen thing... Aug 29, 2013 at 1:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .