How far can mobs see?

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.

Answer

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.

Attribution
Source : Link , Question Author : Zoredache , Answer Author : Not a Name

Leave a Comment