The attribute "followRange" works for only a portion of mobs. When set to 0, mobs should be expected to not target the player (unless the player happens to be standing in the same spot as the mob). When set to a high number, such as 100, mobs are expected to follow the player even when they are out of the mobs default followRange. This is only true for certain mobs.
The attribute works as intended with:
1. Creepers
2. Zombies
3. Skeletons
4. Witches
5. Iron golems
6. Snow golems
The attribute does not work with:
1. Spiders
2. Cave spiders
3. Silverfish
4. Endermen
5. Slimes
6. Magma cubes
7. Zombie pigmen
8. Blaze
9. Ghasts
I am unsure about:
1. Wolves
The Wither has an interesting effect. The main boss' head won't target or chase you, but the two extra heads will continuously fire at you.
There is no effect on the Enderdragon, but I assume that's working as intended.
An example, summoning a Creeper with a 'followRange' of 0 (working as expected):
summon Creeper ~ ~1 ~ {
Attributes:[
{
Name:generic.followRange,
Base:0
}
]
}
(Note you do not need to include the Modifiers tag if you aren't going to modify the Base; regardless, adding them makes no difference)
And an example with a Spider, which does not work:
summon Spider ~ ~1 ~ {
Attributes:[
{
Name:generic.followRange,
Base:0
}
]
}
Linked issues
is duplicated by 1
Comments 5
Duplicate of MC-15533, however this one is much clearer and easier to read.
I just wanna add the comment that it is not working completely with the zombie. If you add to the followrange, it will follow a villager that is inside the range (in my case 150 blocks) and even through a maze, but it will not follow a player before he gets within the default range.
This also affects armor the player wears. If the follow range on a piece of armor is set to +/- 1000% or so, the range that the mob detects the player is 1m smaller. It does not work if the value is not a %.
I've have had this problem too, hopefully it gets fixed